Switch provisioners to install Go from GitHub releases on Ubuntu (#1025)

* install go

* added validation

* check zero build version

* add versions and for ubuntu2004

* setup for ubuntu

* fix execute command

* fix issue with cat

* fix go.sh

* fix comments

* remove documentation

* fix comment position go.sh ubuntu2004

* fix version

* remove import

* remove variables

* remove fake url

* fix linking to default version

Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com>
This commit is contained in:
Dmitry Shibanov
2020-06-19 19:29:07 +03:00
committed by GitHub
parent 53ac16e05d
commit f06102ac3a
9 changed files with 104 additions and 98 deletions

View File

@@ -9,13 +9,13 @@ function Run-ExecutableTests {
[Parameter(Mandatory)] [string[]] $Executables,
[Parameter(Mandatory)] [string] $ToolPath
)
$versionCommand = $Executables["command"]
foreach ($executable in $Executables) {
foreach ($executable in $Executables["tools"]) {
$executablePath = Join-Path $ToolPath $executable
Write-Host "Check $executable..."
if (Test-Path $executablePath) {
Write-Host "$executable is successfully installed: $(& $executablePath --version)"
Write-Host "$executable is successfully installed: $(& $executablePath $versionCommand)"
} else {
Write-Host "$executablePath is not installed!"
exit 1
@@ -27,9 +27,22 @@ $ErrorActionPreference = "Stop"
# Define executables for cached tools
$toolsExecutables = @{
Python = @("python", "bin/pip")
node = @("bin/node", "bin/npm")
PyPy = @("bin/python", "bin/pip")
Python = @{
tools = @("python", "bin/pip")
command = "--version"
}
node = @{
tools = @("bin/node", "bin/npm")
command = "--version"
}
PyPy = @{
tools = @("bin/python", "bin/pip")
command = "--version"
}
go = @{
tools = @("bin/go")
command = "version"
}
}
# Get toolset content