diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -153,18 +153,22 @@ coverage: unit-test-coverage: for PKG in $(PACKAGES); do $(GO) test -tags=sqlite -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done; -.PHONY: test-vendor -test-vendor: - @hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - $(GO) get -u github.com/kardianos/govendor; \ +.PHONY: vendor +vendor: + @hash dep > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + $(GO) get -u github.com/golang/dep/cmd/dep; \ fi - govendor list +unused | tee "$(TMPDIR)/wc-gitea-unused" - [ $$(cat "$(TMPDIR)/wc-gitea-unused" | wc -l) -eq 0 ] || echo "Warning: /!\\ Some vendor are not used /!\\" - - govendor list +outside | tee "$(TMPDIR)/wc-gitea-outside" - [ $$(cat "$(TMPDIR)/wc-gitea-outside" | wc -l) -eq 0 ] || exit 1 + dep ensure -vendor-only - govendor status || exit 1 +.PHONY: test-vendor +test-vendor: vendor + @diff=$$(git diff vendor/); \ + if [ -n "$$diff" ]; then \ + echo "Please run 'make vendor' and commit the result:"; \ + echo "$${diff}"; \ + exit 1; \ + fi; +#TODO add dep status -missing when implemented .PHONY: test-sqlite test-sqlite: integrations.sqlite.test |