Skip to content

Commit

Permalink
trim version id and make version identifier complete
Browse files Browse the repository at this point in the history
  • Loading branch information
luttje committed Oct 14, 2023
1 parent b20f792 commit 2d2a5b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Support/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ if (!$versionId) {
$versionId = $unixTime
}

$versionId = $versionId.Substring(0, [Math]::Min(10, $versionId.Length))

$versionId = "alpha.$versionId"

Write-Output "Creating new '$config' build @ $unixTime with version identifier: '$versionId'"

dotnet msbuild /p:VersionSuffix=alpha.$unixTime /p:Configuration=$config
dotnet msbuild /p:VersionSuffix=$versionId /p:Configuration=$config

$versionPrefix = [xml](Get-Content Core/Key2Joy.Core/Key2Joy.Core.csproj) | Select-Xml -XPath "/Project/PropertyGroup/VersionPrefix" | Select-Object -ExpandProperty Node | Select-Object -ExpandProperty "#text"

$versionId = "$versionPrefix-$versionId"

Write-Output $versionId

0 comments on commit 2d2a5b4

Please sign in to comment.