mirror of
https://github.com/cmderdev/cmder.git
synced 2025-04-16 22:52:32 +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
|
Push-Location -Path $saveTo
|
||||||
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||||
|
|
||||||
|
# Get the version string
|
||||||
|
$Version = Get-Version-Str ($PSScriptRoot + '\..\' + 'CHANGELOG.md')
|
||||||
|
|
||||||
# Check for requirements
|
# Check for requirements
|
||||||
Ensure-Exists $sourcesPath
|
Ensure-Exists $sourcesPath
|
||||||
Ensure-Executable "7z"
|
Ensure-Executable "7z"
|
||||||
@ -116,6 +119,7 @@ Pop-Location
|
|||||||
|
|
||||||
if($Compile) {
|
if($Compile) {
|
||||||
Push-Location -Path $launcher
|
Push-Location -Path $launcher
|
||||||
|
Create-RC $Version ($launcher + '\src\version.rc2');
|
||||||
msbuild CmderLauncher.vcxproj /p:configuration=Release
|
msbuild CmderLauncher.vcxproj /p:configuration=Release
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
throw "msbuild failed to build the executable."
|
throw "msbuild failed to build the executable."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user