PdfPig/tools/generate-nightly-version.ps1
2021-08-16 21:46:23 -04:00

7 lines
292 B
PowerShell

$toolsRoot = (Split-Path -parent $PSCommandPath)
$mainVersion = & "$toolsRoot\get-main-version.ps1"
$commitHash = (git rev-parse HEAD).Substring(0, 5)
$date = [System.DateTime]::UtcNow.ToString('yyyyMMdd')
$nightlyVersion = "$mainVersion-alpha-$date-$commitHash"
Write-Output $nightlyVersion