summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2017-05-02 15:22:21 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-05-02 15:22:21 +0200
commitbb5f694fc57c3ade9c13e841b9a237f4e192da22 (patch)
tree70df94aa1dee0990e0b7dfa39ccdb5bb9a5340fb /Makefile
parent0d1e001b9cae08c2d5f0ffc0ef9fec0f92d1683e (diff)
downloadgitea-bb5f694fc57c3ade9c13e841b9a237f4e192da22.tar.gz
gitea-bb5f694fc57c3ade9c13e841b9a237f4e192da22.zip
Improve govendor testing (#1623)
- Use `govendor list +outside +unused` for finding missing or unused deps and govendor status for catching modified vendor. - Remove appengine import
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b0ca71e219..2a6c42430c 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