Skip to content

Commit

Permalink
cmake: Fix potential configure error when setting up buildnumber
Browse files Browse the repository at this point in the history
If the "CI" environment variable is defined but "GITHUB_RUN_ID" is not
this will result in a broken if statement.
For example, this can be the case for some Debian build pipelines
  • Loading branch information
WarmUpTill committed Apr 24, 2024
1 parent a1289fd commit 1f0cb0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/common/buildnumber.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(NOT DEFINED PLUGIN_BUILD_NUMBER AND EXISTS "${_BUILD_NUMBER_CACHE}")
file(READ "${_BUILD_NUMBER_CACHE}" PLUGIN_BUILD_NUMBER)
math(EXPR PLUGIN_BUILD_NUMBER "${PLUGIN_BUILD_NUMBER}+1")
elseif(NOT DEFINED PLUGIN_BUILD_NUMBER)
if($ENV{CI} AND $ENV{GITHUB_RUN_ID})
if("$ENV{CI}" AND "$ENV{GITHUB_RUN_ID}")
set(PLUGIN_BUILD_NUMBER "$ENV{GITHUB_RUN_ID}")
else()
set(PLUGIN_BUILD_NUMBER "1")
Expand Down

0 comments on commit 1f0cb0e

Please sign in to comment.