mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 05:07:02 +00:00
Add Boost env variable to Linux docs (#2043)
* Add Boost env variable to Linux docs
* Revert "Add Boost env variable to Linux docs"
This reverts commit 67a54f233c.
* Update script to generate Boost variables for linux
* updated software report script to correct version
* Lots of fixes
* fix markdown formatting
This commit is contained in:
33
images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1
Normal file → Executable file
33
images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1
Normal file → Executable file
@@ -29,11 +29,36 @@ function Get-ToolcacheGoVersions {
|
||||
}
|
||||
|
||||
function Get-ToolcacheBoostVersions {
|
||||
$Name = "Boost"
|
||||
$toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "boost"
|
||||
if (-not (Test-Path $toolcachePath)) {
|
||||
return @()
|
||||
}
|
||||
return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
|
||||
|
||||
$BoostVersions = Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
|
||||
$ToolInstances = $BoostVersions | ForEach-Object {
|
||||
$VersionEnvVar = $_.replace(".", "_")
|
||||
return @{
|
||||
Version = $_
|
||||
Architecture = "x64"
|
||||
"Environment Variable" = "BOOST_ROOT_${VersionEnvVar}"
|
||||
|
||||
}
|
||||
}
|
||||
$Content = $ToolInstances | New-MDTable -Columns ([ordered]@{
|
||||
Version = "left";
|
||||
Architecture = "left";
|
||||
"Environment Variable" = "left"
|
||||
})
|
||||
|
||||
$markdown = ""
|
||||
|
||||
if ($Content.Count -gt 0) {
|
||||
$markdown += New-MDHeader $Name -Level 4
|
||||
$markdown += New-MDParagraph -Lines $Content
|
||||
}
|
||||
|
||||
return $markdown
|
||||
}
|
||||
|
||||
function Build-CachedToolsSection {
|
||||
@@ -54,11 +79,7 @@ function Build-CachedToolsSection {
|
||||
$output += New-MDHeader "Go" -Level 4
|
||||
$output += New-MDList -Lines (Get-ToolcacheGoVersions) -Style Unordered
|
||||
|
||||
$boostVersions = Get-ToolcacheBoostVersions
|
||||
if ($boostVersions.Count -gt 0) {
|
||||
$output += New-MDHeader "Boost" -Level 4
|
||||
$output += New-MDList -Lines $boostVersions -Style Unordered
|
||||
}
|
||||
$output += Get-ToolcacheBoostVersions
|
||||
|
||||
return $output
|
||||
}
|
||||
Reference in New Issue
Block a user