Add flag parsing for -up-version and -prod in build_x64.bat. Update archive naming to include a _prod suffix when -prod is specified.
This commit is contained in:
parent
ce61986035
commit
f179c581d0
@ -10,10 +10,21 @@ set CONFIG_FILE=%PROJECT_DIR%config.ini
|
|||||||
set TG_BOT_TOKEN=8256716069:AAFgZRB_0Y6KTpqFQmCxIlZiWdY5m2dR2D8
|
set TG_BOT_TOKEN=8256716069:AAFgZRB_0Y6KTpqFQmCxIlZiWdY5m2dR2D8
|
||||||
set TG_CHAT_ID=-5177086220
|
set TG_CHAT_ID=-5177086220
|
||||||
|
|
||||||
|
REM Разбор флагов (в любом порядке): -up-version и -prod
|
||||||
|
set FLAG_UPVERSION=0
|
||||||
|
set FLAG_PROD=0
|
||||||
|
:parse_args
|
||||||
|
if "%~1"=="" goto after_args
|
||||||
|
if /i "%~1"=="-up-version" set FLAG_UPVERSION=1
|
||||||
|
if /i "%~1"=="-prod" set FLAG_PROD=1
|
||||||
|
shift
|
||||||
|
goto parse_args
|
||||||
|
:after_args
|
||||||
|
|
||||||
for /f "tokens=2 delims==" %%V in ('findstr /b /i "version=" "%CONFIG_FILE%"') do set OLD_VERSION=%%V
|
for /f "tokens=2 delims==" %%V in ('findstr /b /i "version=" "%CONFIG_FILE%"') do set OLD_VERSION=%%V
|
||||||
set CURRENT_VERSION=%OLD_VERSION%
|
set CURRENT_VERSION=%OLD_VERSION%
|
||||||
|
|
||||||
if "%~1"=="-up-version" (
|
if "!FLAG_UPVERSION!"=="1" (
|
||||||
echo === [0] Incrementing build version ===
|
echo === [0] Incrementing build version ===
|
||||||
for /f "tokens=1-3 delims=." %%A in ("!OLD_VERSION!") do (
|
for /f "tokens=1-3 delims=." %%A in ("!OLD_VERSION!") do (
|
||||||
set MAJOR=%%A
|
set MAJOR=%%A
|
||||||
@ -27,7 +38,10 @@ if "%~1"=="-up-version" (
|
|||||||
echo Version: !CURRENT_VERSION!
|
echo Version: !CURRENT_VERSION!
|
||||||
)
|
)
|
||||||
|
|
||||||
set ZIP_NAME=ARC_x64_!CURRENT_VERSION!.zip
|
REM При -prod добавляем prod в имя архива
|
||||||
|
set PROD_SUFFIX=
|
||||||
|
if "!FLAG_PROD!"=="1" set PROD_SUFFIX=_prod
|
||||||
|
set ZIP_NAME=ARC_x64_!CURRENT_VERSION!!PROD_SUFFIX!.zip
|
||||||
|
|
||||||
echo === [1/5] Configuring CMake for x64 Release ===
|
echo === [1/5] Configuring CMake for x64 Release ===
|
||||||
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
|
if not exist "%BUILD_DIR%" mkdir "%BUILD_DIR%"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user