mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
Simplify Validate-Julia.ps1 script
This commit is contained in:
@@ -14,36 +14,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add details of available versions in Markdown
|
# Add description of the software to Markdown
|
||||||
$tmplMark = @"
|
|
||||||
#### {0}
|
|
||||||
|
|
||||||
_Environment:_
|
|
||||||
* {1}: root directory of the Julia {0} installation
|
|
||||||
|
|
||||||
"@
|
|
||||||
|
|
||||||
$tmplMarkRoot = @"
|
|
||||||
#### {0}
|
|
||||||
|
|
||||||
_Environment:_
|
|
||||||
* PATH: contains the location of julia.exe version {0}
|
|
||||||
* {1}: root directory of the Julia {0} installation
|
|
||||||
"@
|
|
||||||
|
|
||||||
$SoftwareName = "Julia (x64)"
|
$SoftwareName = "Julia (x64)"
|
||||||
$Description = New-Object System.Text.StringBuilder
|
$juliaVersion = $(julia --version) -match "\d+\.\d+\.\d+"
|
||||||
$juliaVersionsToInstall = $env:JULIA_VERSIONS.split(",")
|
|
||||||
|
|
||||||
foreach($julia in $juliaVersionsToInstall) {
|
$Description = @"
|
||||||
$juliaVersion = Get-JuliaVersion
|
_Version:_ $juliaVersion<br/>
|
||||||
if ($juliaVersion -eq $julia) {
|
"@
|
||||||
if($julia -eq $env:JULIA_DEFAULT) {
|
|
||||||
$null = $Description.AppendLine(($tmplMarkRoot -f $juliaVersion))
|
|
||||||
} else {
|
|
||||||
$null = $Description.AppendLine(($tmplMark -f $juliaVersion))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||||
|
|||||||
Reference in New Issue
Block a user