mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 22:09:26 +00:00
32 lines
761 B
PowerShell
32 lines
761 B
PowerShell
################################################################################
|
|
## File: Validate-Cmake.ps1
|
|
## Desc: Validate Cmake
|
|
################################################################################
|
|
|
|
if(Get-Command -Name 'cmake')
|
|
{
|
|
Write-Host "Cmake $(cmake -version) on path"
|
|
}
|
|
else
|
|
{
|
|
Write-Host 'cmake not on path'
|
|
exit 1
|
|
}
|
|
|
|
|
|
if( $( $(cmake -version) | Out-String) -match 'cmake version (?<version>.*).*' )
|
|
{
|
|
$cmakeVersion = $Matches.version.Trim()
|
|
}
|
|
|
|
# Adding description of the software to Markdown
|
|
$SoftwareName = "Cmake"
|
|
|
|
$Description = @"
|
|
_Version:_ $cmakeVersion<br/>
|
|
_Environment:_
|
|
* PATH: contains location of cmake.exe
|
|
"@
|
|
|
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|