forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
108 lines (79 loc) · 2.24 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
export GO15VENDOREXPERIMENT := 1
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
HASH := md5
else
HASH := md5sum
endif
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
apidocs: generate
./hack/gen-swagger-doc/gen-swagger-docs.sh v1 html
build: checksync fmt vet compile
goveralls:
./hack/goveralls.sh
compile:
./hack/build-go.sh install ${WHAT}
vet:
./hack/build-go.sh vet ${WHAT}
fmt:
goimports -w -local kubevirt.io cmd/ pkg/ tests/
fmt-bash:
shfmt -i 4 -w cluster/ hack/ images/
test: build
./hack/build-go.sh test ${WHAT}
functest:
./hack/functests.sh
clean:
./hack/build-go.sh clean ${WHAT}
rm _out/ -rf
rm tools/openapispec/openapispec -rf
distclean: clean
find manifests -name "*.yaml" -type f -delete
rm -rf vendor/
rm -f .glide.*.hash
glide cc
checksync:
@test -f .glide.yaml.hash || ${HASH} glide.yaml > .glide.yaml.hash
@if [ "`${HASH} glide.yaml`" != "`cat .glide.yaml.hash`" ]; then \
glide cc; \
glide update --strip-vendor; \
${HASH} glide.yaml > .glide.yaml.hash; \
${HASH} glide.lock > .glide.lock.hash; \
elif [ "`${HASH} glide.lock`" != "`cat .glide.lock.hash`" ]; then \
make sync; \
fi
sync:
glide install --strip-vendor
${HASH} glide.lock > .glide.lock.hash
docker:
hack/dockerized make build
./hack/build-docker.sh build ${WHAT}
publish: docker
./hack/build-docker.sh push ${WHAT}
manifests:
./hack/build-manifests.sh
check: check-bash vet
test -z "`./hack/build-go.sh fmt`"
check-bash:
find . -name \*.sh -exec bash -n \{\} \;
.release-functest:
make functest > .release-functest 2>&1
release-announce: .release-functest
./hack/release-announce.sh $(RELREF) $(PREREF)
cluster-up:
./cluster/up.sh
cluster-down:
./cluster/down.sh
cluster-build:
./cluster/build.sh
cluster-deploy:
./cluster/deploy.sh
cluster-sync: cluster-build cluster-deploy
.PHONY: build fmt test clean distclean checksync sync docker manifests vet publish functest release-announce fmt-bash cluster-up cluster-down cluster-deploy cluster-sync