mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
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:
parent
f4321bbc33
commit
eaf7048ed7
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user