diff --git a/ci/settings.yml b/ci/settings.yml index d6fb821..5662ec9 100644 --- a/ci/settings.yml +++ b/ci/settings.yml @@ -161,15 +161,16 @@ jobs: | xargs -0 -I{} cp -a {} "repo-bumped" cd "repo-bumped" || exit 115 - awk '/^go /{print $2}' go.mod > ../golang-info/previous-version + awk '/^toolchain /{sub(/go/,"",$2); 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); print $3}' - ) + go_version=${toolchain_version#"go"} inferred_go_min_version="${go_version%.*}.0" sed -i -Ee "s/^go [[:digit:].]+\$/go ${inferred_go_min_version}/" go.mod + sed -i -Ee "s/^toolchain go[[:digit:].]+\$/toolchain ${toolchain_version}/" go.mod go get -t -u ./... go mod tidy