mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
26 lines
694 B
PowerShell
26 lines
694 B
PowerShell
################################################################################
|
|
## File: Validate-Mercurial.ps1
|
|
## Desc: Validate Mercurial
|
|
################################################################################
|
|
|
|
if (Get-Command -Name 'hg')
|
|
{
|
|
Write-Host "Mercurial on path"
|
|
}
|
|
else
|
|
{
|
|
Write-Host 'Mercurial is not on path'
|
|
exit 1
|
|
}
|
|
|
|
# Adding description of the software to Markdown
|
|
$SoftwareName = "Mercurial"
|
|
$(hg --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+"
|
|
$MercurialVersion = $matches[0]
|
|
|
|
$Description = @"
|
|
_Version:_ $MercurialVersion<br/>
|
|
"@
|
|
|
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|