mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ chg: add commit-id file for local build version patches
This commit is contained in:
parent
fb569c31ba
commit
085c634cd1
7
.gitignore
vendored
7
.gitignore
vendored
@ -43,7 +43,9 @@ Thumbs.db
|
||||
/Build/Signing/Password.txt
|
||||
/distrib/Notepad3*.exe
|
||||
|
||||
/Notepad3.VC.VC.opendb
|
||||
/Version_*.cmd
|
||||
/Versions/build.txt
|
||||
/Versions/commit_id.txt
|
||||
|
||||
/res/Notepad3.exe.manifest.conf
|
||||
/minipath/res/Notepad3.exe.manifest.conf
|
||||
@ -51,9 +53,8 @@ Thumbs.db
|
||||
/minipath/src/VersionEx.h
|
||||
|
||||
/test/test.log
|
||||
/Notepad3.VC.VC.opendb
|
||||
|
||||
/Version_*.cmd
|
||||
/Versions/build.txt
|
||||
/np3portableapp/*.7z
|
||||
/np3portableapp/*.paf.exe
|
||||
/np3portableapp/_buildname.txt
|
||||
|
||||
16
Version.ps1
16
Version.ps1
@ -37,11 +37,17 @@ try
|
||||
$Minor = [int]$(Get-Date -format yy)
|
||||
$Revis = [int]$(Get-Date -format MMdd)
|
||||
if ($AppVeyorEnv) {
|
||||
$CommitID = ([string]($env:appveyor_repo_commit)).substring(0,7)
|
||||
$CommitID = ([string]($env:appveyor_repo_commit)).substring(0,8)
|
||||
$Build = [int]($env:appveyor_build_number)
|
||||
}
|
||||
else {
|
||||
$CommitID = [string]($env:computername)
|
||||
$CommitID = [string](Get-Content "Versions\commit_id.txt")
|
||||
if ($CommitID -eq "computername") {
|
||||
$CommitID = ([string]($env:computername)).substring(0,8).ToLower()
|
||||
}
|
||||
else {
|
||||
$CommitID = $CommitID.substring(0,8)
|
||||
}
|
||||
$Build = [int](Get-Content "Versions\build.txt") + 1
|
||||
}
|
||||
if (!$CommitID) { $CommitID = "---" }
|
||||
@ -59,6 +65,9 @@ try
|
||||
|
||||
$CompleteVer = "$Major.$Minor.$Revis.$Build"
|
||||
DebugOutput("Version number: 'v$CompleteVer $VerPatch'")
|
||||
if ($AppVeyorEnv) {
|
||||
Update-AppveyorBuild -Version $CompleteVer
|
||||
}
|
||||
|
||||
#~if ($VerPatch) { $VerPatch = " $VerPatch" } # ensure space in front of string
|
||||
|
||||
@ -80,9 +89,6 @@ try
|
||||
(Get-Content "res\Notepad3.exe.manifest.conf") | ForEach-Object { $_ -replace '\$APPNAME\$', "$AppName" } | Set-Content "res\Notepad3.exe.manifest.conf"
|
||||
(Get-Content "res\Notepad3.exe.manifest.conf") | ForEach-Object { $_ -replace '\$VERPATCH\$', "$VerPatch" } | Set-Content "res\Notepad3.exe.manifest.conf"
|
||||
(Get-Content "res\Notepad3.exe.manifest.conf") | ForEach-Object { $_ -replace '\$VERSION\$', "$CompleteVer" } | Set-Content "res\Notepad3.exe.manifest.conf"
|
||||
if ($AppVeyorEnv) {
|
||||
Update-AppveyorBuild -Version $CompleteVer
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
1
Versions/commit_id.txt
Normal file
1
Versions/commit_id.txt
Normal file
@ -0,0 +1 @@
|
||||
computername
|
||||
Loading…
Reference in New Issue
Block a user