@@ -5,26 +5,19 @@ export GOARCH:=amd64
5
5
GOFILES: =$(shell find . -name '* .go' | grep -v -E '(./vendor|internal/templates.go) ')
6
6
GOPATH_BIN: =$(shell echo ${GOPATH} | awk 'BEGIN { FS = ":" }; { print $1 }') /bin
7
7
8
- all : fmt bin/linux/bootkube bin/darwin/bootkube vet
8
+ all : bin/linux/bootkube bin/darwin/bootkube
9
9
10
- fmt :
10
+ check : pkg/asset/internal/templates.go
11
11
@find . -name vendor -prune -o -name ' *.go' -exec gofmt -s -d {} +
12
-
13
- vet : GOPACKAGES:=$(shell go list ./... | grep -v '/vendor/')
14
- vet :
15
- @go vet $(GOPACKAGES )
16
-
17
- # This will naively try and create a vendor dir from a k8s release
18
- # USE: make vendor VENDOR_VERSION=vX.Y.Z
19
- VENDOR_VERSION = v1.2.1
20
- vendor : vendor-$(VENDOR_VERSION )
12
+ @go vet $(shell go list ./... | grep -v '/vendor/')
13
+ @go test -v $(shell go list ./... | grep -v '/vendor/')
21
14
22
15
bin/% /bootkube : $(GOFILES ) pkg/asset/internal/templates.go
23
16
mkdir -p $(dir $@ )
24
17
GOOS=$* go build -o bin/$* /bootkube github.com/coreos/bootkube/cmd/bootkube
25
18
26
- install : all
27
- cp bin/ $( shell uname | tr A-Z a-z) /bootkube $(GOPATH_BIN )
19
+ install : bin/ $( shell uname | tr A-Z a-z) /bootkube
20
+ cp $< $(GOPATH_BIN )
28
21
29
22
pkg/asset/internal/templates.go : $(GOFILES )
30
23
mkdir -p $(dir $@ )
@@ -38,6 +31,11 @@ conformance-%: clean all
38
31
@sleep 30 # Give addons a little time to start
39
32
@cd hack/$* -node && ./conformance-test.sh
40
33
34
+ # This will naively try and create a vendor dir from a k8s release
35
+ # USE: make vendor VENDOR_VERSION=vX.Y.Z
36
+ VENDOR_VERSION = v1.2.1
37
+ vendor : vendor-$(VENDOR_VERSION )
38
+
41
39
vendor-$(VENDOR_VERSION ) :
42
40
@echo " Creating k8s vendor dir: $@ "
43
41
@mkdir -p $@ /k8s.io/kubernetes
52
50
rm -rf bin/
53
51
rm -rf pkg/asset/internal
54
52
55
- .PHONY : all clean fmt vet install pkg/asset/internal/templates.go
53
+ .PHONY : all check clean install vendor pkg/asset/internal/templates.go
56
54
0 commit comments