Merge pull request #403 from RaiKoHoff/BugFixes4Release_0308

Version String Patching
This commit is contained in:
Derick Payne 2018-03-10 08:56:48 +02:00 committed by GitHub
commit 1554631084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 19 additions and 16 deletions

View File

@ -4,7 +4,8 @@
# - adapt $Build number in case of local machine builds
# ------------------------------------------------------------
param(
[switch]$AppVeyorEnv = $false
[switch]$AppVeyorEnv = $false,
[string]$VerPatch = ""
)
# ------------------------------------------------------------
Set-StrictMode -Version Latest
@ -34,15 +35,11 @@ try
$Major = 3
$Minor = [int]$(Get-Date -format yy)
$Revis = [int]$(Get-Date -format MMdd)
$BetaVer = 'L" "'
$BetaVerA = '" "'
if ($AppVeyorEnv) {
$Build = [int]($env:appveyor_build_number)
}
else {
$Build = [int](Get-Content "Versions\build.txt") + 1
#$BetaVer = 'L" develop "'
#$BetaVerA = '" develop "'
}
if (!$Build) { $Build = 0 }
$SciVer = [int](Get-Content "scintilla\version.txt")
@ -51,7 +48,9 @@ try
if (!$OnigmoVer) { $OnigmoVer = "0.0.0" }
$CompleteVer = "$Major.$Minor.$Revis.$Build"
DebugOutput("Version number: '$CompleteVer'")
DebugOutput("Version number: '$VerPatch v$CompleteVer'")
if ($VerPatch) { $VerPatch = " $VerPatch" } # ensure space in front of string
Copy-Item -LiteralPath "Versions\VersionEx.h.tpl" -Destination "src\VersionEx.h" -Force
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$MAJOR\$', "$Major" } | Set-Content "src\VersionEx.h"
@ -60,8 +59,8 @@ try
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$BUILD\$', "$Build" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$SCIVER\$', "$SciVer" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$ONIGMOVER\$', "$OnigmoVer" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$BETAVER\$', "$BetaVer" } | Set-Content "src\VersionEx.h"
(Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$BETAVERA\$', "$BetaVerA" } | 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 '\$VERPATCH\$', "$VerPatch" } | 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 '\$VERSION\$', $CompleteVer } | Set-Content "res\Notepad3.exe.manifest.conf"

2
Version_RC.cmd Normal file
View File

@ -0,0 +1,2 @@
@echo off
Version -VerPatch "RC"

2
Version_develop.cmd Normal file
View File

@ -0,0 +1,2 @@
@echo off
Version -VerPatch "develop"

Binary file not shown.

View File

@ -1 +1 @@
916
918

View File

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

View File

@ -638,7 +638,7 @@ END
// Dialog
//
IDD_ABOUT DIALOGEX 0, 0, 400, 275
IDD_ABOUT DIALOGEX 0, 0, 400, 274
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_NOFAILCREATE | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Notepad3"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
@ -653,7 +653,7 @@ BEGIN
CONTROL "",IDC_WEBPAGE,"SysLink",WS_TABSTOP,190,55,100,10
CONTROL IDR_RIZBITMAP,IDC_RIZONEBMP,"Static",SS_BITMAP | SS_NOTIFY | SS_REALSIZEIMAGE,305,7,130,20,WS_EX_TRANSPARENT
PUSHBUTTON "Copy Version Text",IDC_COPYVERSTRG,304,35,76,14,BS_FLAT
CONTROL "",IDC_RICHEDITABOUT,"RichEdit20W",WS_VSCROLL | WS_HSCROLL | WS_TABSTOP | 0x29c4,20,80,360,170
CONTROL "",IDC_RICHEDITABOUT,"RichEdit20W",WS_VSCROLL | WS_HSCROLL | WS_TABSTOP | 0x29c4,20,80,360,168
END
IDD_FIND DIALOGEX 0, 0, 273, 129

Binary file not shown.

View File

@ -5,9 +5,9 @@
// //////////////////////////////////////////////////////////
#define VERSION_MAJOR 3
#define VERSION_MINOR 18
#define VERSION_REV 303
#define VERSION_BUILD 916
#define VERSION_REV 307
#define VERSION_BUILD 918
#define SCINTILLA_VER 403
#define ONIGMO_REGEX_VER 6.1.3
#define VERSION_BETA L" "
#define VERSIONA_BETA " "
#define VERSION_PATCH L""
#define VERSIONA_PATCH ""