Commit e0c47ef6 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Don't assume /vendor passes gofmt

This was true when we used Godep, no longer true with govendor.
parent 6e29dae2
...@@ -5,6 +5,7 @@ export GOPATH=${BUILD_DIR}/_build ...@@ -5,6 +5,7 @@ export GOPATH=${BUILD_DIR}/_build
export GO15VENDOREXPERIMENT=1 export GO15VENDOREXPERIMENT=1
GOBUILD=go build -ldflags "-X main.Version=${VERSION}" GOBUILD=go build -ldflags "-X main.Version=${VERSION}"
PKG=gitlab.com/gitlab-org/gitlab-workhorse PKG=gitlab.com/gitlab-org/gitlab-workhorse
PKG_ALL = $(shell GOPATH=${GOPATH} go list ${PKG}/... | grep -v /vendor/)
all: clean-build gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse all: clean-build gitlab-zip-cat gitlab-zip-metadata gitlab-workhorse
...@@ -28,8 +29,8 @@ ${BUILD_DIR}/_build: ...@@ -28,8 +29,8 @@ ${BUILD_DIR}/_build:
.PHONY: test .PHONY: test
test: clean-build clean-workhorse all test: clean-build clean-workhorse all
go fmt ${PKG}/... | awk '{ print } END { if (NR > 0) { print "Please run go fmt"; exit 1 } }' go fmt ${PKG_ALL} | awk '{ print } END { if (NR > 0) { print "Please run go fmt"; exit 1 } }'
go test ${PKG}/... go test ${PKG_ALL}
@echo SUCCESS @echo SUCCESS
coverage: coverage:
...@@ -38,7 +39,7 @@ coverage: ...@@ -38,7 +39,7 @@ coverage:
rm -f test.coverage rm -f test.coverage
fmt: fmt:
go fmt ./... go fmt ${PKG_ALL}
.PHONY: clean .PHONY: clean
clean: clean-workhorse clean-build clean: clean-workhorse clean-build
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment