Skip to content

Commit af13f97

Browse files
committed
Bugfix: Set Github env fallbacks for detecting non-ci environment
1 parent b56111a commit af13f97

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/embed_env_vars.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
# If we are running in CI and either building the master branch,
1919
# or building a PR that will merge into the master branch, THEN
2020
# we will build in RELEASE mode.
21-
is_ci = sysenv.get_bool('CI')
22-
is_branch_master = sysenv.get_string('GITHUB_REF_NAME') == 'master'
21+
is_ci = sysenv.get_bool('CI', False)
22+
is_branch_master = sysenv.get_string('GITHUB_REF_NAME', '') == 'master'
2323
is_pr_into_master = (
24-
sysenv.get_string('GITHUB_BASE_REF') == 'master' and sysenv.get_string('GITHUB_EVENT_NAME', '') == 'pull_request'
24+
sysenv.get_string('GITHUB_BASE_REF', '') == 'master'
25+
and sysenv.get_string('GITHUB_EVENT_NAME', '') == 'pull_request'
2526
)
2627
is_release_build = is_ci and (is_branch_master or is_pr_into_master)
2728

0 commit comments

Comments
 (0)