Skip to content

Commit

Permalink
Adopt point releases in go.mod, and specify toolchain version
Browse files Browse the repository at this point in the history
  • Loading branch information
bgandon committed May 10, 2024
1 parent 219443e commit 457a881
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,18 @@ jobs:
awk '/^go /{print $2}' go.mod > ../golang-info/previous-version
(
set -x
toolchain_version=$(go version | awk '{print $3}')
go_version=$(
go version \
| awk '{sub(/go/,"",$3); sub(/\.[[:digit:]]+$/,"",$3); print $3}'
go version | awk '{sub(/go/,"",$3); print $3}'
)
sed -i -Ee "s/^go [[:digit:].]+\$/go ${go_version}/" go.mod
inferred_go_min_version="${go_version%.*}.0"
sed -i -Ee "s/^go [[:digit:].]+\$/go ${inferred_go_min_version}/" go.mod
go get -t -u ./...
go mod tidy
echo "${go_version}" > ../golang-info/version
echo "${toolchain_version}" > ../golang-info/toolchain-version
echo "${go_version}" > ../golang-info/version
echo "${inferred_go_min_version}" > ../golang-info/min-version
)
- task: build-docker-image
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.21
go 1.21.0
toolchain go1.21.10

0 comments on commit 457a881

Please sign in to comment.