This repository was archived by the owner on Jul 30, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ export CGO_ENABLED:=0
22export GOARCH: =amd64
33export PATH: =$(PATH ) :$(PWD )
44
5- SHELL: =$(shell which bash)
65LOCAL_OS: =$(shell uname | tr A-Z a-z)
7- GOFILES: =$(shell find . -name '* .go' | grep -v -E '( ./vendor) ')
6+ GOFILES: =$(shell find . -name '* .go' ! -path ' ./vendor/ * ')
87LDFLAGS =-X github.com/kubernetes-incubator/bootkube/pkg/version.Version=$(shell $(CURDIR ) /build/git-version.sh)
98TERRAFORM: =$(shell command -v terraform 2> /dev/null)
109
@@ -28,8 +27,7 @@ release: \
2827 check \
2928 _output/release/bootkube.tar.gz \
3029
31- check :
32- @gofmt -l -s $(GOFILES ) | read ; if [ $$ ? == 0 ]; then gofmt -s -d $( GOFILES) ; exit 1; fi
30+ check : gofmt
3331ifdef TERRAFORM
3432 $(TERRAFORM) fmt -check ; if [ ! $$? -eq 0 ]; then exit 1; fi
3533else
3937 @./scripts/verify-gopkg.sh
4038 @go test -v $(shell go list ./... | grep -v '/vendor/\|/e2e')
4139
40+ gofmt :
41+ gofmt -s -w $(GOFILES )
42+ git diff --exit-code
43+
4244install :
4345 go install -ldflags " $( LDFLAGS) " ./cmd/bootkube
4446
@@ -84,4 +86,4 @@ vendor:
8486clean :
8587 rm -rf _output
8688
87- .PHONY : all check clean install release vendor
89+ .PHONY : all check clean gofmt install release vendor
You can’t perform that action at this time.
0 commit comments