From 457a8815bfed7d5b9448d51f92970d48c3f56a34 Mon Sep 17 00:00:00 2001 From: Benjamin Gandon Date: Fri, 10 May 2024 19:44:59 +0200 Subject: [PATCH] Adopt point releases in go.mod, and specify toolchain version --- ci/settings.yml | 11 +++++++---- go.mod | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci/settings.yml b/ci/settings.yml index 098623b..d6fb821 100644 --- a/ci/settings.yml +++ b/ci/settings.yml @@ -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 diff --git a/go.mod b/go.mod index 1e1ffe9..652758d 100644 --- a/go.mod +++ b/go.mod @@ -21,4 +21,5 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.21 +go 1.21.0 +toolchain go1.21.10