8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

Parse FB_BUILD_SUFFIX to extract release type during packaging.

This removes the need to set the string via an env var prior to building
This commit is contained in:
Paul Reeves 2023-09-25 16:49:51 +02:00
parent 200b62bb71
commit 837cf80a79

View File

@ -159,11 +159,13 @@ set /A FBBUILD_PACKAGE_NUMBER+=1
)
@echo Setting FBBUILD_PACKAGE_NUMBER to %FBBUILD_PACKAGE_NUMBER%
:: If a suffix is defined (usually for an RC) ensure it is prefixed correctly.
if defined FBBUILD_FILENAME_SUFFIX (
if not "%FBBUILD_FILENAME_SUFFIX:~0,1%"=="-" (
(set FBBUILD_FILENAME_SUFFIX=-%FBBUILD_FILENAME_SUFFIX%)
)
:: Generate FBBUILD_FILENAME_SUFFIX from FB_BUILD_SUFFIX and add prefix '-'
@for /f "tokens=3-5" %%a in ( "%FB_BUILD_SUFFIX%" ) do (
if "%%~a" == "Release" (
set FBBUILD_FILENAME_SUFFIX=-RC%%~c
) else (
set FBBUILD_FILENAME_SUFFIX=-%%~a%%~b
)
)
:: Set up our final destination