Skip to content

Commit

Permalink
deps: Pin go to 1.22 (#1247)
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Llorente <[email protected]>
  • Loading branch information
qinqon authored Jun 10, 2024
1 parent e91f57a commit 272b294
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion automation/check-patch.setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ rm -rf $tmp_dir
mkdir -p $tmp_dir

if gimme --help > /dev/null 2>&1; then
export GIMME_GO_VERSION=$(grep '^go' go.mod |sed 's/go //')

go_mod_version=$(grep '^go' go.mod |sed 's/go //')
full_version=$(curl -s https://go.dev/dl/?mode=json |jq -r .[].version |grep "$go_mod_version")
export GIMME_GO_VERSION=$(echo $full_version |sed 's/go//')
echo "Installing go $GIMME_GO_VERSION with gimme"
eval "$(gimme)"
else
Expand Down
6 changes: 5 additions & 1 deletion build/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
version=$1
arch=""
os=linux
go_mod_version=$1

dnf install -y jq
full_version=$(curl -s https://go.dev/dl/?mode=json |jq -r .[].version |grep "$go_mod_version")

case $(uname -m) in
x86_64) arch="amd64";;
Expand All @@ -14,6 +18,6 @@ if [ "$arch" == "" ]; then
exit 1
fi

tarball_url="https://go.dev/dl/go${version}.${os}-${arch}.tar.gz"
tarball_url="https://go.dev/dl/${full_version}.${os}-${arch}.tar.gz"

curl --retry 10 -L $tarball_url | tar -C /usr/local -zxf -
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/nmstate/kubernetes-nmstate

go 1.22.4
go 1.22

require (
github.com/evanphx/json-patch v5.6.0+incompatible
Expand Down

0 comments on commit 272b294

Please sign in to comment.