diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2019-09-17 18:15:31 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-09-17 18:15:31 +0300 |
commit | 001bbcc534a0d6cbb2446b3ad96f70f4e7bc4733 (patch) | |
tree | b3f72b6224ea84dd94845ad8d6e9877230d36664 /Makefile.util.mk | |
parent | ebfd0db7ad0e3ac781764694c1c07d1184ee4c0b (diff) |
check go.mod go.sum
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r-- | Makefile.util.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk index 626d146b..8a36d805 100644 --- a/Makefile.util.mk +++ b/Makefile.util.mk @@ -24,7 +24,7 @@ bench: .GOPATH/.ok gitlab-pages go test -bench=. -run=^$$ $(allpackages) # The acceptance tests cannot count for coverage -cover: bin/gocovmerge .GOPATH/.ok +cover: bin/gocovmerge .GOPATH/.ok gitlab-pages @echo "NOTE: make cover does not exit 1 on failure, don't use it to check for tests success!" $Q rm -f .GOPATH/cover/*.out .GOPATH/cover/all.merged $(if $V,@echo "-- go test -coverpkg=./... -coverprofile=.GOPATH/cover/... ./...") @@ -44,3 +44,16 @@ cover: bin/gocovmerge .GOPATH/.ok list: .GOPATH/.ok @echo $(allpackages) + +deps-check: .GOPATH/.ok + go mod tidy + @if git diff --color=always --exit-code -- go.mod go.sum; then \ + echo "go.mod and go.sum are ok"; \ + else \ + echo ""; \ + echo "go.mod and go.sum are modified, please commit them";\ + exit 1; \ + fi; + +deps-download: .GOPATH/.ok + go mod download |