Skip to content

Commit

Permalink
Make CI script to verify that vendor is in sync
Browse files Browse the repository at this point in the history
Signed-off-by: Odin Ugedal <odin@ugedal.com>
  • Loading branch information
odinuge committed Jun 19, 2019
1 parent 4fc7a7c commit 4f6014b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all shell dbuild man release \
localtest localunittest localintegration \
test unittest integration \
cross localcross
cross localcross vendor vendor-verify

GO := go

Expand Down Expand Up @@ -116,7 +116,16 @@ validate:
script/validate-c
$(GO) vet $(allpackages)

ci: validate test release
ci: validate test vendor-verify release

vendor:
export GO111MODULE=on \
$(GO) mod tidy && \
$(GO) mod vendor && \
$(GO) mod verify

vendor-verify: vendor
git diff --exit-code -- go.mod go.sum vendor/ || (echo 'error: vendor/ and/or go.mod not up to date. Run "make vendor" to update'; exit 1)

cross: runcimage
docker run ${DOCKER_RUN_PROXY} -e BUILDTAGS="$(BUILDTAGS)" --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_IMAGE) make localcross
Expand Down

0 comments on commit 4f6014b

Please sign in to comment.