diff --git a/.build/linuxPostBuildEvent.sh b/.build/linuxPostBuildEvent.sh index fe52ac53..2fef7c1b 100644 --- a/.build/linuxPostBuildEvent.sh +++ b/.build/linuxPostBuildEvent.sh @@ -4,5 +4,4 @@ cd $PROJECT sed -i -r -e 's/AssemblyInformationalVersion\(".*?"\)/AssemblyInformationalVersion("GITVERSION")/' $PROJECT/Properties/AssemblyInfo.cs sed -i -r -e 's/AssemblyVersion\(".*?"\)/AssemblyVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs sed -i -r -e 's/AssemblyFileVersion\(".*?"\)/AssemblyFileVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs -sed -i -r -e 's/AssemblyTitle\(".*?"\)/AssemblyTitle("FULLVERSION")/' $PROJECT/Properties/AssemblyInfo.cs -sed -i -e 's/var matchingServerVersion = "";/var matchingServerVersion = "'$(git describe --long)'";/' $PROJECT/../Output/Website/js/main.js +sed -i -r -e 's/AssemblyTitle\(".*?"\)/AssemblyTitle("FULLVERSION")/' $PROJECT/Properties/AssemblyInfo.cs \ No newline at end of file diff --git a/.build/winPostBuild.ps1 b/.build/winPostBuild.ps1 index 416353fc..6b5150b3 100644 --- a/.build/winPostBuild.ps1 +++ b/.build/winPostBuild.ps1 @@ -3,19 +3,6 @@ param( [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'} `