forked from GoogleCloudPlatform/k8s-config-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GoogleCloudPlatform#1963 from justinsb/update_gola…
…ng_1_22_4 Add script to update golang; bump to 1.22.4
- Loading branch information
Showing
14 changed files
with
52 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM golang:1.22 AS builder | ||
FROM golang:1.22.4 AS builder | ||
|
||
RUN GO111MODULE=on go install sigs.k8s.io/controller-tools/cmd/[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
set -x | ||
|
||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
cd ${REPO_ROOT} | ||
|
||
|
||
GO_TOOLCHAIN=$(curl https://go.dev/dl/?mode=json | jq -r '[.[] | select(.stable == true)] | .[0].version') | ||
echo "GO_TOOLCHAIN=$GO_TOOLCHAIN" | ||
|
||
# GO_VERSION is the GO_TOOLCHAIN without the go prefix | ||
GO_VERSION=${GO_TOOLCHAIN#go} | ||
echo "GO_VERSION=$GO_VERSION" | ||
|
||
# Update go.mod files | ||
cd ${REPO_ROOT} | ||
for f in $(git ls-files 'go.mod' '**/go.mod'); do | ||
cd ${REPO_ROOT} | ||
cd $(dirname $f) | ||
echo "Updating $f to toolchain $GO_TOOLCHAIN" | ||
go mod edit -toolchain=${GO_TOOLCHAIN} | ||
done | ||
|
||
# Update Docker images | ||
cd ${REPO_ROOT} | ||
for f in $(git ls-files 'Dockerfile*' '**/Dockerfile*'); do | ||
echo "Updating Dockerfile $f to go image $GO_VERSION" | ||
sed -i -e "s/FROM golang:[0-9.]*/FROM golang:$GO_VERSION/g" $f | ||
done | ||
|
||
# Ignore third_party changes | ||
cd ${REPO_ROOT} | ||
git co -- third_party/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ module facade | |
|
||
go 1.22 | ||
|
||
toolchain go1.22.3 | ||
toolchain go1.22.4 | ||
|
||
require ( | ||
k8s.io/apimachinery v0.28.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters