+ fix: hardening commit_id.txt file (bis)

This commit is contained in:
Pairi Daiza 2020-06-18 18:29:23 +02:00
parent d89e84ee74
commit f9939cf74c

View File

@ -64,14 +64,14 @@ try
$CommitID = ([string]($env:computername)).substring(0,[math]::min($length,8)).ToLower()
}
else {
if (!$CommitID) { $CommitID = "---" }
$CommitID = $CommitID -replace '"', ''
$CommitID = $CommitID -replace "'", ''
$length = $CommitID.length
$CommitID = $CommitID.substring(0,[math]::min($length,8))
}
}
if (!$CommitID) { $CommitID = "---" }
$CommitID = $CommitID -replace '"', ''
$CommitID = $CommitID -replace "'", ''
if (!$CommitID) { $CommitID = "---" }
$Build | Set-Content "Versions\build.txt"
$CompleteVer = "$Major.$Minor.$Revis.$Build"