forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (63 loc) · 2.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
export GO15VENDOREXPERIMENT := 1
HASH := md5sum
all: build manifests
generate: sync
find pkg/ -name "*generated*.go" -exec rm {} -f \;
./hack/build-go.sh generate ${WHAT}
goimports -w -local kubevirt.io cmd/ pkg/ tests/
./hack/bootstrap-ginkgo.sh
(cd tools/openapispec/ && go build)
tools/openapispec/openapispec --dump-api-spec-path api/openapi-spec/swagger.json
build: checksync fmt vet compile
compile:
./hack/build-go.sh install ${WHAT}
vet:
./hack/build-go.sh vet ${WHAT}
fmt:
goimports -w -local kubevirt.io cmd/ pkg/ tests/
test: build
./hack/build-go.sh test ${WHAT}
functest:
./hack/build-go.sh functest ${WHAT}
clean:
./hack/build-go.sh clean ${WHAT}
rm ./bin -rf
rm tools/openapispec/openapispec -rf
distclean: clean
rm -rf vendor/
rm -f manifest/*.yaml
rm -f .Gopkg.*.hash
checksync:
if [ ! -e .Gopkg.toml.hash ] || [ "`${HASH} Gopkg.toml`" != "`cat .Gopkg.toml.hash`" ]; then \
dep ensure && \
${HASH} Gopkg.toml > .Gopkg.toml.hash && \
${HASH} Gopkg.lock > .Gopkg.lock.hash; \
elif [ ! -e .Gopkg.lock.hash ] || [ "`${HASH} Gopkg.lock`" != "`cat .Gopkg.lock.hash`" ]; then \
make sync; \
fi
sync:
dep ensure -vendor-only && \
${HASH} Gopkg.lock > .Gopkg.lock.hash;
docker: build
./hack/build-docker.sh build ${WHAT}
publish: docker
./hack/build-docker.sh push ${WHAT}
manifests: $(wildcard manifests/*.in)
./hack/build-manifests.sh
check: check-bash vet
test -z "`./hack/build-go.sh fmt`"
check-bash:
find . -name \*.sh -exec bash -n \{\} \;
vagrant-sync-config:
./cluster/vagrant/sync_config.sh
vagrant-sync-build: build
./cluster/vagrant/sync_build.sh
vagrant-sync-optional:
./cluster/vagrant/sync_build.sh 'build optional'
vagrant-deploy: vagrant-sync-config vagrant-sync-build
export KUBECTL="cluster/kubectl.sh --core" && ./cluster/deploy.sh
.release-functest:
make functest > .release-functest 2>&1
release-announce: .release-functest
./hack/release-announce.sh $(RELREF) $(PREREF)
.PHONY: build fmt test clean distclean checksync sync docker manifests vet publish vagrant-sync-config vagrant-sync-build vagrant-deploy functest release-announce