Sitelet https://github.com/kubernetes/kops/commit/3ee3b9fdec1270b27fe1857af8b5c227003f352f
Skip to content

Commit 3ee3b9f

Browse files
authored
Merge pull request #18405 from hakman/automated-cherry-pick-of-#18401-upstream-release-1.34
Automated cherry pick of #18401: gomod: tidy and verify all modules
2 parents 18ac221 + 1589f7f commit 3ee3b9f

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎Makefile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,10 @@ ko-kops-utils-cp-push:
324324
gomod:
325325
go mod tidy
326326
go mod vendor
327-
cd hack; go mod tidy
328-
cd tests/e2e; go mod tidy
329-
cd tools/otel/traceserver; go mod tidy
327+
for dir in $$(find . -name go.mod -not -path './go.mod' -not -path './vendor/*' -not -path '*/.*' | xargs -n1 dirname | sort); do \
328+
echo "go mod tidy: $$dir"; \
329+
( cd "$$dir" && go mod tidy ); \
330+
done
330331

331332
.PHONY: gofmt
332333
gofmt:

‎hack/verify-gomod.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ cd "${KOPS_ROOT}"
2424

2525
make gomod
2626

27-
changes=$(git status --porcelain go.mod go.sum vendor/ tests/e2e/go.mod tests/e2e/go.sum || true)
27+
# Check every module's go.mod/go.sum plus the vendored tree, excluding hidden directories
28+
# that aren't part of the source (e.g. .claude worktrees, .idea).
29+
changes=$(git status --porcelain -- '*go.mod' '*go.sum' vendor/ ':(exclude,glob)**/.*/**' || true)
2830
if [ -n "${changes}" ]; then
2931
echo "ERROR: go modules are not up to date; please run: make gomod"
3032
echo "changed files:"

0 commit comments

Comments
 (0)