summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 14 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 9adba6a98a..85be7eee81 100644
--- a/Makefile
+++ b/Makefile
@@ -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