Skip to content

Commit 7d9f14b

Browse files
committed
chore: Fix unstable version setting
1 parent be7a3ec commit 7d9f14b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ IF "%Mode%" == "Stable" (
8787
)
8888

8989
REM Get product version and code revision.
90-
FOR /F "usebackq tokens=1* delims==" %%A IN (`CALL GetVersion.cmd`) DO SET %%A=%%B
90+
FOR /F "usebackq tokens=1* delims==" %%A IN (`CALL GetVersion.cmd %Mode%`) DO SET %%A=%%B
9191
SET Version=%OpenRails_Version%
9292
SET Revision=%OpenRails_Revision%
9393

GetVersion.cmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
44
REM Get product version and code revision.
55
SET Version=
66
SET Revision=
7-
FOR /F "usebackq tokens=2" %%B IN (`git branch --points-at HEAD`) DO SET Branch=%%B
87
FOR /F "usebackq tokens=1* delims=-" %%V IN (`git describe --first-parent --always --long`) DO (
98
SET Version=%%V
109
SET Revision=%%W
1110
)
12-
IF "%Branch%" == "unstable" (
11+
IF "%~1%" == "Unstable" (
1312
SET TZ=UTC
1413
FOR /F "usebackq tokens=1* delims=-" %%V IN (`git log -1 --pretty^=format:^%%ad --date^=format-local:^%%Y^.%%m^.%%d-^%%H^%%M`) DO (
1514
SET Version=%%V
@@ -21,6 +20,5 @@ IF "%Version%" == "" (
2120
)
2221

2322
REM Output version numbers.
24-
ECHO OpenRails_Branch=%Branch%
2523
ECHO OpenRails_Version=%Version%
2624
ECHO OpenRails_Revision=%Revision%

0 commit comments

Comments
 (0)