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
|
||||
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
|
||||
LDFLAGS ?=
|
||||
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
|
||||
|
||||
mod-check: check-env
|
||||
@echo 'running: go mod verify'
|
||||
@go mod verify && [ "$(shell sha512sum go.mod)" = "`sha512sum go.mod`" ] || ( echo "ERROR: go.mod was modified by 'go mod verify'" && false )
|
||||
for module in $(GO_MODULES_LIST); do \
|
||||
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
|
||||
rm -f scripts/golangci.yml.buildtags.in
|
||||
|
2
go.sum
2
go.sum
@ -1406,4 +1406,4 @@ sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
Loading…
Reference in New Issue
Block a user