mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user