diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2018-05-21 14:34:20 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-05-21 15:34:20 +0300 |
commit | 3f3383dc0a0de9d6a0444bba71603e5c5d248f0b (patch) | |
tree | 34f4f2ad9ce686d265c2f81e6a3e1b02b92e8e22 /Makefile | |
parent | d7fd9bf7bb25e7537aef335a0927c216aed881a3 (diff) | |
download | gitea-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-- | 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 |