add automatic version creation

with this commit, the build script extracts the latest version string found in `CHANGELOG.md`, and then creates appropriate resource files for the executable compilation
This commit is contained in:
David Refoua 2018-03-28 20:48:57 +04:30 committed by GitHub
parent f4321bbc33
commit eaf7048ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,9 @@ $ErrorActionPreference = "Stop"
Push-Location -Path $saveTo
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
# Get the version string
$Version = Get-Version-Str ($PSScriptRoot + '\..\' + 'CHANGELOG.md')
# Check for requirements
Ensure-Exists $sourcesPath
Ensure-Executable "7z"
@ -116,6 +119,7 @@ Pop-Location
if($Compile) {
Push-Location -Path $launcher
Create-RC $Version ($launcher + '\src\version.rc2');
msbuild CmderLauncher.vcxproj /p:configuration=Release
if ($LastExitCode -ne 0) {
throw "msbuild failed to build the executable."