Files
Vocaluxe/.build/winPostBuild.ps1
lukeIam 152be5d8ad - calculate full version tag in build script and set AssemblyTitle
- display AssemblyTitle in Vocaluxe gui
- code names are stored in .build/versionNames.json
- pre and post build scripts for windows (one place for all commands)
- adjusted and moved the linux build scripts
2016-12-28 23:01:34 +01:00

23 lines
880 B
PowerShell

param(
[Parameter(Mandatory=$true)]
[String]$ProjectDir
)
if($Env:GIT_VERSION_TAG)
{
$version = $Env:GIT_VERSION_TAG;
}
else
{
$version = git describe --long;
}
(Get-Content -Encoding UTF8 "$($ProjectDir)..\Output\Website\js\main.js") `
| Foreach-Object {$_ -replace '(?<=var *matchingServerVersion * = *\")\w*(?=\" *;)', "$version"} `
| Set-Content -Encoding UTF8 "$($ProjectDir)..\Output\Website\js\main.js"
(Get-Content -Encoding UTF8 "$($ProjectDir)Properties\AssemblyInfo.cs") `
| Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\(\").*(?=\")', 'GITVERSION'} `
| Foreach-Object {$_ -replace '(?<=(AssemblyVersion|AssemblyFileVersion)\(\").*(?=\")', 'SHORTVERSION'} `
| Foreach-Object {$_ -replace '(?<=AssemblyTitle\(\").*(?=\")', 'FULLVERSION'} `
| Set-Content -Encoding UTF8 "$($ProjectDir)Properties\AssemblyInfo.cs"