From 2c2e2eb21dc37313edf8b85cb8499f904a38b924 Mon Sep 17 00:00:00 2001 From: Odin Ugedal Date: Wed, 19 Jun 2019 21:56:44 +0200 Subject: [PATCH] Make CI script to verify that vendor is in sync Signed-off-by: Odin Ugedal --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c60f8237154..b6f5f93b27c 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 || (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