Skip to content
Snippets Groups Projects
Commit fc0df6e0 authored by Pavel Vondruska's avatar Pavel Vondruska
Browse files

Automaticka detekce posledni stable verze GO

parent 5d41134a
No related branches found
No related tags found
No related merge requests found
Pipeline #1212 failed
...@@ -9,7 +9,7 @@ set -x ...@@ -9,7 +9,7 @@ set -x
# Nastaveni promennych, pokud je SINVERSION zakomentovana, pokusime se odhadnout nejnovejsi # Nastaveni promennych, pokud je SINVERSION zakomentovana, pokusime se odhadnout nejnovejsi
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
export GOVERSION=1.17.5 OS=linux ARCH=amd64 #export GOVERSION=go1.17.6 OS=linux ARCH=amd64
#export SINVERSION=3.9.2 #export SINVERSION=3.9.2
# Nacteni promennych o bezicim systemu vcetne verzi # Nacteni promennych o bezicim systemu vcetne verzi
...@@ -37,14 +37,15 @@ apt install -yqqq build-essential dpkg-dev debhelper build-essential libssl-dev ...@@ -37,14 +37,15 @@ apt install -yqqq build-essential dpkg-dev debhelper build-essential libssl-dev
# Automaticka detekce posledni releasnute verze # Automaticka detekce posledni releasnute verze
SINVERSION=${SINVERSION:-$(curl -s https://github.com/sylabs/singularity/releases/latest | grep -Po "\/v\K[^\"]+")} SINVERSION=${SINVERSION:-$(curl -s https://github.com/sylabs/singularity/releases/latest | grep -Po "\/v\K[^\"]+")}
GOVERSION=${GOVERSION:-$(curl -s https://go.dev/VERSION?m=text)}
# Priprava adresare pro hotove balicky a zapamatovani cesty # Priprava adresare pro hotove balicky a zapamatovani cesty
mkdir build mkdir build
export BUILD=${PWD}/build export BUILD=${PWD}/build
# Stazeni a instalace GO # Stazeni a instalace GO
wget -q -O /tmp/go${GOVERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/go${GOVERSION}.${OS}-${ARCH}.tar.gz && tar -C /usr/local -xzf /tmp/go${GOVERSION}.${OS}-${ARCH}.tar.gz wget -q -O /tmp/${GOVERSION}.${OS}-${ARCH}.tar.gz https://dl.google.com/go/${GOVERSION}.${OS}-${ARCH}.tar.gz && tar -C /usr/local -xzf /tmp/${GOVERSION}.${OS}-${ARCH}.tar.gz
rm /tmp/go${GOVERSION}.${OS}-${ARCH}.tar.gz rm /tmp/${GOVERSION}.${OS}-${ARCH}.tar.gz
# Nastaveni promennych GO # Nastaveni promennych GO
echo 'export GOPATH=${HOME}/go' >> ~/.bashrc echo 'export GOPATH=${HOME}/go' >> ~/.bashrc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment