mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08: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 67a54f233cf332cd1550d35927580e4998dd032a. * 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 {
|
function Get-ToolcacheBoostVersions {
|
||||||
|
$Name = "Boost"
|
||||||
$toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "boost"
|
$toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "boost"
|
||||||
if (-not (Test-Path $toolcachePath)) {
|
if (-not (Test-Path $toolcachePath)) {
|
||||||
return @()
|
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 {
|
function Build-CachedToolsSection {
|
||||||
@@ -54,11 +79,7 @@ function Build-CachedToolsSection {
|
|||||||
$output += New-MDHeader "Go" -Level 4
|
$output += New-MDHeader "Go" -Level 4
|
||||||
$output += New-MDList -Lines (Get-ToolcacheGoVersions) -Style Unordered
|
$output += New-MDList -Lines (Get-ToolcacheGoVersions) -Style Unordered
|
||||||
|
|
||||||
$boostVersions = Get-ToolcacheBoostVersions
|
$output += Get-ToolcacheBoostVersions
|
||||||
if ($boostVersions.Count -gt 0) {
|
|
||||||
$output += New-MDHeader "Boost" -Level 4
|
|
||||||
$output += New-MDList -Lines $boostVersions -Style Unordered
|
|
||||||
}
|
|
||||||
|
|
||||||
return $output
|
return $output
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user