diff --git a/build.bat b/build.bat index 9766e9f72..e0b87d05a 100644 --- a/build.bat +++ b/build.bat @@ -15,17 +15,15 @@ if not defined VERSION_PATCH set VERSION_PATCH=1 if not defined WEASEL_VERSION set WEASEL_VERSION=%VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_PATCH% if not defined WEASEL_BUILD set WEASEL_BUILD=0 -if not defined PRODUCT_VERSION ( - rem use numeric build version for release build - set PRODUCT_VERSION=%WEASEL_VERSION%.%WEASEL_BUILD% - rem for non-release build, try to use git commit hash as product build version - if not defined RELEASE_BUILD ( - rem check if git is installed and available, then get the short commit id of head - git --version >nul 2>&1 - if not errorlevel 1 ( - rem get short commmit id of head - for /F %%i in ('git rev-parse --short HEAD') do (set PRODUCT_VERSION=%WEASEL_VERSION%-%%i) - ) +rem use numeric build version for release build +set PRODUCT_VERSION=%WEASEL_VERSION%.%WEASEL_BUILD% +rem for non-release build, try to use git commit hash as product build version +if not defined RELEASE_BUILD ( + rem check if git is installed and available, then get the short commit id of head + git --version >nul 2>&1 + if not errorlevel 1 ( + rem get short commmit id of head + for /F %%i in ('git rev-parse --short HEAD') do (set PRODUCT_VERSION=%WEASEL_VERSION%-%%i) ) )