mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-04-11 18:13:00 +00:00
ci: check for modified files after go mod checks
Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
7f7988be0d
commit
1fc2e55983
10
Makefile
10
Makefile
@ -55,6 +55,9 @@ CEPH_VERSION ?= $(shell . $(CURDIR)/build.env ; echo $${CEPH_VERSION})
|
|||||||
# TODO: ceph_preview tag required for FSQuiesce API
|
# TODO: ceph_preview tag required for FSQuiesce API
|
||||||
GO_TAGS_LIST ?= $(CEPH_VERSION) ceph_preview
|
GO_TAGS_LIST ?= $(CEPH_VERSION) ceph_preview
|
||||||
|
|
||||||
|
# CephCSI currently has 4 modules in these directories.
|
||||||
|
GO_MODULES_LIST = ./ e2e/ api/ actions/retest
|
||||||
|
|
||||||
# go build flags
|
# go build flags
|
||||||
LDFLAGS ?=
|
LDFLAGS ?=
|
||||||
LDFLAGS += -X $(GO_PROJECT)/internal/util.GitCommit=$(GIT_COMMIT)
|
LDFLAGS += -X $(GO_PROJECT)/internal/util.GitCommit=$(GIT_COMMIT)
|
||||||
@ -108,8 +111,11 @@ go-test-api: check-env
|
|||||||
@pushd api && ../scripts/test-go.sh && popd
|
@pushd api && ../scripts/test-go.sh && popd
|
||||||
|
|
||||||
mod-check: check-env
|
mod-check: check-env
|
||||||
@echo 'running: go mod verify'
|
for module in $(GO_MODULES_LIST); do \
|
||||||
@go mod verify && [ "$(shell sha512sum go.mod)" = "`sha512sum go.mod`" ] || ( echo "ERROR: go.mod was modified by 'go mod verify'" && false )
|
echo "running: go mod checks in $$module"; \
|
||||||
|
(cd "$$module" && go mod tidy && go mod vendor && go mod verify);\
|
||||||
|
done
|
||||||
|
test -z "$(shell git status --short)" || (echo "files were modified during go mod checks: " ; git status --short ; false)
|
||||||
|
|
||||||
scripts/golangci.yml: scripts/golangci.yml.in
|
scripts/golangci.yml: scripts/golangci.yml.in
|
||||||
rm -f scripts/golangci.yml.buildtags.in
|
rm -f scripts/golangci.yml.buildtags.in
|
||||||
|
Loading…
Reference in New Issue
Block a user