mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 12:28:01 +08: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user