Skip to content

Commit

Permalink
Restore go module toolchain version
Browse files Browse the repository at this point in the history
We set the Go module toolchain version to an earlier version to allow
running `go mod tidy` from older versions. However, this has the side
effect of making the Go toolchain emulate older Go versions. This breaks
some standard library tests which expect current toolchain behavior. To
fix this, restore Go module toolchain version after tidy.
  • Loading branch information
derekparker committed Sep 1, 2023
1 parent b242a22 commit bbce84d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-ubi-centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ jobs:
# lower the go build version to 1.16
sed -i "s/go mod tidy/go mod tidy -go=1.16/g" scripts/create-secondary-patch.sh
./scripts/full-initialize-repo.sh
# raise the go module version back to what is expected to prevent the toolchain from emulating older versions.
go mod edit -go="$(./go/bin/go version | awk '{ print $3 }' | sed 's/go//' | awk -F. '{printf "%s.%s\n", $1, $2}')" ./go/src/go.mod
- name: "Configure FIPS tests"
shell: bash
Expand Down

0 comments on commit bbce84d

Please sign in to comment.