diff --git a/Version.ps1 b/Version.ps1 index df6a8e530..cb3e455bc 100644 --- a/Version.ps1 +++ b/Version.ps1 @@ -58,6 +58,7 @@ try $Build = $Build + 1 # locally: we have no commit ID, create an arificial one $CommitID = [string](Get-Content "Versions\commit_id.txt") + if (!$CommitID) { $CommitID = "---" } if ($CommitID -eq "computername") { $length = ([string]($env:computername)).length $CommitID = ([string]($env:computername)).substring(0,[math]::min($length,8)).ToLower() @@ -68,6 +69,9 @@ try } } if (!$CommitID) { $CommitID = "---" } + $CommitID = $CommitID -replace '"', '' + $CommitID = $CommitID -replace "'", '' + if (!$CommitID) { $CommitID = "---" } $Build | Set-Content "Versions\build.txt" $CompleteVer = "$Major.$Minor.$Revis.$Build"