diff --git a/templates/docker/Dockerfile b/templates/docker/Dockerfile index b1469485..1a4c6e38 100644 --- a/templates/docker/Dockerfile +++ b/templates/docker/Dockerfile @@ -44,7 +44,7 @@ RUN apt-get update \ ## NOTE(neoaggelos): Go version used to build components ## !!!IMPORTANT!!! Keep up to date with "snapcraft.yaml:parts.build-deps.build-snaps.go" ADD install-go.sh / -RUN /install-go.sh 1.22 && ln -s /usr/local/go/bin/go /usr/local/bin/go +RUN /install-go.sh 1.22.6 && ln -s /usr/local/go/bin/go /usr/local/bin/go ## Prepare build environment ENV SNAPCRAFT_PART_INSTALL=/out diff --git a/templates/docker/install-go.sh b/templates/docker/install-go.sh index f1ebf46b..d5e6e7d3 100755 --- a/templates/docker/install-go.sh +++ b/templates/docker/install-go.sh @@ -3,13 +3,13 @@ # Author: Angelos Kolaitis # # Usage: -# $ install-go.sh 1.22 +# $ install-go.sh 1.22.6 # -# Description: Download latest go version and install under /usr/local/go +# Description: Download go version and install under /usr/local/go VERSION="$1" -fname="$(curl -s https://go.dev/dl/ | grep -o "go$VERSION.*.linux-amd64.tar.gz" | head -1)" -wget "https://go.dev/dl/$fname" -tar -C /usr/local -xvzf "$fname" -rm "$fname" +fname="go${VERSION}.linux-amd64.tar.gz" +wget "https://go.dev/dl/${fname}" +tar -C /usr/local -xvzf "${fname}" +rm "${fname}"