Skip to content

Commit

Permalink
[CI] bump gvm version and use the binary (elastic#24571)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored and narph committed Mar 17, 2021
1 parent b7b2a16 commit 38f2876
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .ci/scripts/install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ fi
echo "UNMET DEP: Installing Go"
mkdir -p "${HOME}/bin"

curl -sSLo "${GVM_CMD}" "https:/andrewkroh/gvm/releases/download/v0.2.2/gvm-${OS}-${GVM_ARCH_SUFFIX}"
curl -sSLo "${GVM_CMD}" "https:/andrewkroh/gvm/releases/download/v0.3.0/gvm-${OS}-${GVM_ARCH_SUFFIX}"
chmod +x "${GVM_CMD}"

gvm ${GO_VERSION}|cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE}
${GVM_CMD} "${GO_VERSION}" |cut -d ' ' -f 2|tr -d '\"' > ${PROPERTIES_FILE}

eval $(gvm ${GO_VERSION})
eval "$("${GVM_CMD}" "${GO_VERSION}")"
4 changes: 2 additions & 2 deletions .ci/scripts/install-tools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ mkdir %WORKSPACE%\bin
IF EXIST "%PROGRAMFILES(X86)%" (
REM Force the gvm installation.
SET GVM_BIN=gvm.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.2.4/gvm-windows-amd64.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
exit /b 1
)
) ELSE (
REM Windows 7 workers got a broken gvm installation.
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.2.4/gvm-windows-386.exe
curl -L -o %WORKSPACE%\bin\gvm.exe https:/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-386.exe
IF ERRORLEVEL 1 (
REM gvm installation has failed.
exit /b 1
Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if (-Not (Test-Path $gopath_beats)) {
if (-Not (Get-Command "gvm" -ErrorAction SilentlyContinue)) {
echo "Installing gvm to manage go version"
[Net.ServicePointManager]::SecurityProtocol = "tls12"
Invoke-WebRequest -URI https:/andrewkroh/gvm/releases/download/v0.2.2/gvm-windows-amd64.exe -Outfile C:\\Windows\\System32\\gvm.exe
Invoke-WebRequest -URI https:/andrewkroh/gvm/releases/download/v0.3.0/gvm-windows-amd64.exe -Outfile C:\\Windows\\System32\\gvm.exe
C:\\Windows\\System32\\gvm.exe --format=powershell #{GO_VERSION} | Invoke-Expression
go version
Expand Down Expand Up @@ -119,7 +119,7 @@ def linuxGvmProvision(arch="amd64")
return <<SCRIPT
mkdir -p ~/bin
if [ ! -e "~/bin/gvm" ]; then
curl -sL -o ~/bin/gvm https:/andrewkroh/gvm/releases/download/v0.2.2/gvm-linux-#{arch}
curl -sL -o ~/bin/gvm https:/andrewkroh/gvm/releases/download/v0.3.0/gvm-linux-#{arch}
chmod +x ~/bin/gvm
~/bin/gvm #{GO_VERSION}
echo 'export GOPATH=$HOME/go' >> ~/.bash_profile
Expand Down

0 comments on commit 38f2876

Please sign in to comment.