From f72e97dbf8a580d7747f851ce101790f694ea2ab Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Thu, 13 Jul 2017 07:03:57 +0000 Subject: [PATCH] Makefile: `go build -i` -> `go build` Signed-off-by: Akihiro Suda --- .travis.yml | 4 +++- Makefile | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ae87ca764..4ac0c38da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,9 @@ script: - export CGO_ENABLED=$TRAVIS_CGO_ENABLED - GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make dco - make fmt - - make vet +# FIXME: For non-linux GOOS, without running `go build -i`, vet fails with `vet: import failed: can't find import: fmt`... +# However, running `go build -i` requires root privilege. So let's skip vet for non-linux atm (#1179). + - if [ "$GOOS" = "linux" ]; then make vet; fi - make build - make binaries - if [ "$GOOS" = "linux" ]; then sudo make install ; fi diff --git a/Makefile b/Makefile index 0f8d172cd..2334ab3d5 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ ineffassign: ## run ineffassign build: ## build the go packages @echo "$(WHALE) $@" - @go build -i -v ${EXTRA_FLAGS} ${GO_LDFLAGS} ${GO_GCFLAGS} ${PACKAGES} + @go build -v ${EXTRA_FLAGS} ${GO_LDFLAGS} ${GO_GCFLAGS} ${PACKAGES} test: ## run tests, except integration tests and tests that require root @echo "$(WHALE) $@" @@ -136,7 +136,7 @@ FORCE: # Build a binary from a cmd. bin/%: cmd/% FORCE @echo "$(WHALE) $@${BINARY_SUFFIX}" - @go build -i -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ${GO_GCFLAGS} ./$< + @go build -o $@${BINARY_SUFFIX} ${GO_LDFLAGS} ${GO_TAGS} ${GO_GCFLAGS} ./$< binaries: $(BINARIES) ## build binaries @echo "$(WHALE) $@"