+ chg: remove AppVeyors build number, add build-of-the-day number, add commit/local build ID

This commit is contained in:
RaiKoHoff 2020-02-10 14:57:04 +01:00
parent 17b75185e3
commit 1d3719abd9
6 changed files with 16 additions and 9 deletions

View File

@ -36,13 +36,18 @@ try
$Major = 5
$Minor = [int]$(Get-Date -format yy)
$Revis = [int]$(Get-Date -format MMdd)
#~$Build = [int]($env:appveyor_build_number )
$Build = [int](Get-Content "Versions\build.txt")
if ($AppVeyorEnv) {
$Build = [int]($env:appveyor_build_number)
$CommitID = [string]($env:appveyor_repo_commit)
}
else {
$Build = [int](Get-Content "Versions\build.txt") + 1
$CommitID = [string]($env:computername)
$Build = $Build + 1
$Build | Set-Content "Versions\build.txt"
}
if (!$Build) { $Build = 0 }
if (!$CommitID) { $CommitID = "0" }
$SciVer = [string](Get-Content "scintilla\version.txt")
if (!$SciVer) { $SciVer = 0 }
$OnigVer = [string](Get-Content "oniguruma\version.txt")
@ -71,6 +76,7 @@ try
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$TINYEXPRVER\$', "$TinyExprVer" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$UTHASHVER\$', "$UtHashVer" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$VERPATCH\$', "$VerPatch" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$COMMITID\$', "$CommitID" } | Set-Content "src\VersionEx.h"
Copy-Item -LiteralPath "Versions\Notepad3.exe.manifest.tpl" -Destination "res\Notepad3.exe.manifest.conf" -Force
(Get-Content "res\Notepad3.exe.manifest.conf") | ForEach-Object { $_ -replace '\$APPNAME\$', "$AppName" } | Set-Content "res\Notepad3.exe.manifest.conf"
@ -89,7 +95,6 @@ catch
}
finally
{
$Build | Set-Content "Versions\build.txt"
[Environment]::SetEnvironmentVariable("LASTEXITCODE", $LastExitCode, "User")
$host.SetShouldExit($LastExitCode)
Write-Host "VersionPatching: Done! Elapsed time: $($stopwatch.Elapsed)."

View File

@ -16,3 +16,4 @@
#define TINYEXPR_VER $TINYEXPRVER$
#define UTHASH_VER $UTHASHVER$
#define VERSION_PATCH $VERPATCH$
#define VERSION_COMMIT_ID $COMMITID$

View File

@ -1 +1 @@
2725
1

View File

@ -3,7 +3,7 @@
<assemblyIdentity
name="Notepad3"
processorArchitecture="*"
version="5.20.208.2725"
version="5.20.210.1"
type="win32"
/>
<description>Notepad3 BETA</description>

View File

@ -664,7 +664,7 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam
SetWindowLongPtr(hwnd, DWLP_USER, (LONG_PTR)lParam);
if (Globals.hDlgIcon) { SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)Globals.hDlgIcon); }
SetDlgItemText(hwnd, IDC_VERSION, _W(_STRG(VERSION_FILEVERSION_LONG)));
SetDlgItemText(hwnd, IDC_VERSION, _W(_STRG(VERSION_FILEVERSION_LONG)) L" (" _W(_STRG(VERSION_COMMIT_ID)) L")");
static HFONT hFontTitle = NULL;
if (hFontTitle) { DeleteObject(hFontTitle); }
@ -891,7 +891,7 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam
// --------------------------------------------------------------------
StringCchCopy(wchVerInfo, COUNTOF(wchVerInfo), _W(_STRG(VERSION_FILEVERSION_LONG)));
StringCchCopy(wchVerInfo, COUNTOF(wchVerInfo), _W(_STRG(VERSION_FILEVERSION_LONG)) L" (" _W(_STRG(VERSION_COMMIT_ID)) L")");
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n" VERSION_COMPILER);
StringCchCat(wchVerInfo, COUNTOF(wchVerInfo), L"\n");

View File

@ -8,11 +8,12 @@
#define SAPPNAME "Notepad3"
#define VERSION_MAJOR 5
#define VERSION_MINOR 20
#define VERSION_REV 208
#define VERSION_BUILD 2725
#define VERSION_REV 210
#define VERSION_BUILD 1
#define SCINTILLA_VER 430
#define ONIGURUMA_REGEX_VER 6.9.4
#define UCHARDET_VER 2018.09.27
#define TINYEXPR_VER 2018.05.11
#define UTHASH_VER 2.1.0
#define VERSION_PATCH BETA
#define VERSION_COMMIT_ID local