From f79ed0bb09096208a7e7872d041b0bb522b0b0fb Mon Sep 17 00:00:00 2001 From: Deniz Surmeli <52484739+denizsurmeli@users.noreply.github.com> Date: Thu, 4 Jul 2024 14:10:30 +0300 Subject: [PATCH] Makefile: check if the vendor has no diffs (#731) https://github.com/peak/s5cmd/pull/684 shows that if the vendor and the vendor generated by the tidy&vendor pipeline has diffs, we don't fail in the CI, but we should. This PR adds the check to the Makefile. --------- Co-authored-by: Deniz Surmeli --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5e065cd23..5d36cbef4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ default: all .PHONY: all -all: clean build test check +all: clean build test check checkgomod VERSION := `git describe --abbrev=0 --tags || echo "0.0.0"` BUILD := `git rev-parse --short HEAD` @@ -61,4 +61,9 @@ gogenerate: clean: @rm -f ./s5cmd +.PHONY: checkgomod +checkgomod: ## Check go.mod file + @go mod tidy + @git diff --exit-code -- go.sum go.mod + .NOTPARALLEL: