mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 10:09:20 +08:00
Cleanup old markdown documenation approach (#979)
This commit is contained in:
committed by
GitHub
parent
8c8f384a61
commit
43e26fa96b
@@ -41,35 +41,3 @@ $installedMinGWTools | ForEach-Object {
|
||||
}
|
||||
}
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
|
||||
function Get-ToolVersion {
|
||||
param(
|
||||
[string] $ToolPath,
|
||||
[int] $VersionLineNumber
|
||||
)
|
||||
|
||||
$toolRawVersion = Invoke-Expression "$ToolPath --version"
|
||||
$toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null
|
||||
$toolVersion = $matches[0]
|
||||
return $toolVersion
|
||||
}
|
||||
|
||||
$SoftwareName = "MSYS2"
|
||||
$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1
|
||||
$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0
|
||||
$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0
|
||||
$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0
|
||||
|
||||
$Description = @"
|
||||
> _Note:_ MSYS2 is pre-installed on image but not added to PATH.
|
||||
|
||||
_Tool versions_
|
||||
_pacman:_ $pacmanVersion<br/>
|
||||
_bash:_ $bashVersion<br/>
|
||||
_gcc:_ $gccVersion<br/>
|
||||
_tar:_ $tarVersion<br/>
|
||||
MSYS2 location: C:\msys64
|
||||
"@
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||
|
||||
Reference in New Issue
Block a user