mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Cleanup old markdown documenation approach (#979)
This commit is contained in:
committed by
GitHub
parent
8c8f384a61
commit
43e26fa96b
@@ -25,8 +25,6 @@ function Get-GoVersion
|
||||
{
|
||||
$goFullVersion = $Matches.version
|
||||
Write-Host "$goFullVersion has been found"
|
||||
|
||||
return $goFullVersion
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -46,38 +44,7 @@ else
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Add details of available versions in Markdown
|
||||
$tmplMark = @"
|
||||
#### {0}
|
||||
|
||||
_Environment:_
|
||||
* {1}: root directory of the Go {0} installation
|
||||
|
||||
"@
|
||||
|
||||
$tmplMarkRoot = @"
|
||||
#### {0}
|
||||
|
||||
_Environment:_
|
||||
* PATH: contains the location of go.exe version {0}
|
||||
* GOROOT: root directory of the Go {0} installation
|
||||
* {1}: root directory of the Go {0} installation
|
||||
"@
|
||||
|
||||
$SoftwareName = "Go (x64)"
|
||||
$Description = New-Object System.Text.StringBuilder
|
||||
$goVersionsToInstall = $env:GO_VERSIONS.split(", ", [System.StringSplitOptions]::RemoveEmptyEntries)
|
||||
|
||||
foreach($go in $goVersionsToInstall) {
|
||||
$goVersion = Get-GoVersion -goVersion $go
|
||||
$goVersionTag = "GOROOT_{0}_{1}_X64" -f $go.split(".")
|
||||
if ($goVersion -eq $go) {
|
||||
if($go -eq $env:GO_DEFAULT) {
|
||||
$null = $Description.AppendLine(($tmplMarkRoot -f $goVersion, $goVersionTag))
|
||||
} else {
|
||||
$null = $Description.AppendLine(($tmplMark -f $goVersion, $goVersionTag))
|
||||
}
|
||||
}
|
||||
Get-GoVersion -goVersion $go
|
||||
}
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
|
||||
|
||||
Reference in New Issue
Block a user