mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
ci(go.mod): verify go.mod and go.sum don't have uncommitted changes after go mod tidy
(#1287)
This is to avoid situations such as https://github.com/project-zot/zot/pull/1150 where an indirect dependency became direct without a corresponding go.mod change Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
parent
21b7c69fd9
commit
4939ca3300
1 changed files with 11 additions and 2 deletions
13
Makefile
13
Makefile
|
@ -36,10 +36,19 @@ extended-name:=
|
|||
.PHONY: all
|
||||
all: modcheck swagger binary binary-minimal binary-debug cli bench exporter-minimal verify-config test covhtml check check-gh-actions
|
||||
|
||||
.PHONY: modcheck
|
||||
modcheck:
|
||||
.PHONY: modtidy
|
||||
modtidy:
|
||||
go mod tidy
|
||||
|
||||
.PHONY: modcheck
|
||||
modcheck: modtidy
|
||||
$(eval UNCOMMITED_FILES = $(shell git status --porcelain | grep -c 'go.mod\|go.sum'))
|
||||
@if [ $(UNCOMMITED_FILES) != 0 ]; then \
|
||||
echo "Updated go.mod and/or go.sum have uncommitted changes, commit the changes accordingly ";\
|
||||
git status;\
|
||||
exit 1;\
|
||||
fi
|
||||
|
||||
.PHONY: create-name
|
||||
create-name:
|
||||
ifdef EXTENSIONS
|
||||
|
|
Loading…
Reference in a new issue