diff --git a/.build/linuxPostBuildEvent.sh b/.build/linuxPostBuildEvent.sh index d32d60a1..ff77f1b7 100644 --- a/.build/linuxPostBuildEvent.sh +++ b/.build/linuxPostBuildEvent.sh @@ -5,4 +5,3 @@ sed -i -r -e 's/AssemblyInformationalVersion\(".*?"\)/AssemblyInformationalVersi sed -i -r -e 's/AssemblyVersion\(".*?"\)/AssemblyVersion("0.0.0")/' $PROJECT/Properties/AssemblyInfo.cs sed -i -r -e 's/AssemblyFileVersion\(".*?"\)/AssemblyFileVersion("0.0.0")/' $PROJECT/Properties/AssemblyInfo.cs sed -i -r -e 's/AssemblyTitle\(".*?"\)/AssemblyTitle("Vocaluxe '"'"'Not Versioned'"'"' 0.0.0 (NA) (0.0.0-na-notversioned)")/' $PROJECT/Properties/AssemblyInfo.cs -sed -i -e 's/var matchingServerVersion = "";/var matchingServerVersion = "'$(git describe --long)'";/' $PROJECT/../Output/Website/js/main.js diff --git a/.build/winPostBuild.ps1 b/.build/winPostBuild.ps1 index 301be8aa..2619b535 100644 --- a/.build/winPostBuild.ps1 +++ b/.build/winPostBuild.ps1 @@ -3,18 +3,11 @@ param( [String]$ProjectDir ) -if($Env:GIT_VERSION_TAG) +if($Env:VOCALUXE_SKIP_POSTBUILD) { - $version = $Env:GIT_VERSION_TAG; + Write-Host "Skipping post build script (as requested)" + exit } -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\(\").*(?=\")', '0.0.0-na-notversioned'} `