PdfPig/tools/generate-nightly-version.ps1
Eliot Jones 165bc74c53 try creating a nightly push to nuget script v1
this is intended to create nightly build with package
versions of the form x.y.z-yyyyMMdd.sha and
push them to nuget automatically, only where there
are new changes per day. since devops is a nightmare
and entirely untestable we will have to go through 20
iterations to actually get this to work
2021-08-14 13:01:46 -04:00

7 lines
283 B
PowerShell

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