Skip to content

Commit da3dc1c

Browse files
committed
Use existing go version in go mod tidy and verify
This change ensures that running make mod-tidy doesn't update the go version specified in the mod files. Signed-off-by: Evan Lezar <[email protected]>
1 parent 43e3378 commit da3dc1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $(BINARIES): bin/%:
7474
mod-tidy:
7575
$(Q)for mod in $$(find . -name go.mod); do \
7676
echo "Tidying $$mod..."; ( \
77-
cd $$(dirname $$mod) && go mod tidy \
77+
cd $$(dirname $$mod) && go mod tidy -go=$$(grep -E "^go\s+[1-9]\.[0-9]+$$" go.mod | sed 's/^go //') \
7878
) || exit 1; \
7979
done
8080

0 commit comments

Comments
 (0)