diff --git a/Makefile b/Makefile index b0ca71e2190c..2a6c42430c38 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ SOURCES ?= $(shell find . -name "*.go" -type f) TAGS ?= +TMPDIR := $(shell mktemp -d) + ifneq ($(DRONE_TAG),) VERSION ?= $(subst v,,$(DRONE_TAG)) else @@ -82,7 +84,13 @@ test-vendor: @hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ go get -u github.com/kardianos/govendor; \ fi - govendor status +outside +unused || exit 1 + 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 + + govendor status || exit 1 .PHONY: test-sqlite test-sqlite: integrations.test diff --git a/vendor/vendor.json b/vendor/vendor.json index 0e8e1593510d..ea606f02ffda 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1,6 +1,6 @@ { "comment": "", - "ignore": "test", + "ignore": "test appengine", "package": [ { "checksumSHA1": "spqE5xUEPQp8YV67McMTMAUIilY=",