Skip to content

Commit 002e34c

Browse files
committed
fix(ci): ensure 'auto' toolchain applies to generate
1 parent 2db75de commit 002e34c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script/generate.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ 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+
GOTOOLCHAIN="go1.22.0+auto"
12+
export GOTOOLCHAIN
13+
914
if [ "$1" = "--check" ]; then
1015
GENTEMP="$(mktemp -d)"
1116
git worktree add -q --detach "$GENTEMP"
@@ -43,6 +48,6 @@ for dir in $MOD_DIRS; do
4348
(
4449
cd "$dir"
4550
go generate ./...
46-
GOTOOLCHAIN="go1.22+auto" go mod tidy
51+
go mod tidy
4752
)
4853
done

0 commit comments

Comments
 (0)