Skip to content

Commit

Permalink
make_translation.py: simplify check for SHA ID env var / code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ia committed Aug 3, 2023
1 parent af53c26 commit fff4abb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Translations/make_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,11 +1266,8 @@ def get_translation_sanity_checks_text(defs: dict) -> str:
def get_version_suffix(ver) -> str:
# Check env var from push.yml first:
# - if it's pull request then use vX.YY + C.ID for version line as in *C*I with proper tag instead of merge tag for detached tree
try:
if os.environ["GITHUB_CI_PR_SHA"] != "":
return "C" + "." + os.environ["GITHUB_CI_PR_SHA"][:8].upper()
except KeyError:
True
if os.environ.get("GITHUB_CI_PR_SHA", None) is not None:
return "C" + "." + os.environ["GITHUB_CI_PR_SHA"][:8].upper()
# - no github PR SHA ID, hence keep checking

suffix = str("")
Expand Down

0 comments on commit fff4abb

Please sign in to comment.