summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2018-05-21 14:34:20 +0200
committerLauris BH <lauris@nix.lv>2018-05-21 15:34:20 +0300
commit3f3383dc0a0de9d6a0444bba71603e5c5d248f0b (patch)
tree34f4f2ad9ce686d265c2f81e6a3e1b02b92e8e22 /Makefile
parentd7fd9bf7bb25e7537aef335a0927c216aed881a3 (diff)
downloadgitea-3f3383dc0a0de9d6a0444bba71603e5c5d248f0b.tar.gz
gitea-3f3383dc0a0de9d6a0444bba71603e5c5d248f0b.zip
Migrate to dep (#3972)
* Update makefile to use dep * Migrate to dep * Fix some deps * Try to find a better version for golang.org/x/net * Try to find a better version for golang.org/x/oauth2
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