Skip to content

Commit 76d1d46

Browse files
authored
fix(ci): ensure 'auto' toolchain applies to generate (#3436)
1 parent 991a341 commit 76d1d46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/generate.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ set -e
66

77
CDPATH="" cd -- "$(dirname -- "$0")/.."
88

9+
# force 1.22.0 default and "auto" toolchain (i.e., use the toolchain directive)
10+
# when running generate and mod tidy
11+
export GOTOOLCHAIN="go1.22.0+auto"
12+
913
if [ "$1" = "--check" ]; then
1014
GENTEMP="$(mktemp -d)"
1115
git worktree add -q --detach "$GENTEMP"
@@ -43,6 +47,6 @@ for dir in $MOD_DIRS; do
4347
(
4448
cd "$dir"
4549
go generate ./...
46-
GOTOOLCHAIN="go1.22+auto" go mod tidy
50+
go mod tidy
4751
)
4852
done

0 commit comments

Comments
 (0)