Commit 2feade1a authored by Yan Sushchynski (EPAM)'s avatar Yan Sushchynski (EPAM)
Browse files

GONRG-3618: Local build setup

parent 0c8eadfe
Pipeline #75311 passed with stages
in 2 minutes and 47 seconds
......@@ -33,9 +33,13 @@ def prepare_version():
else:
# we assume that it is commit version
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#local-version-identifiers
commit = os.environ["BUILD_COMMIT_SHORT_SHA"]
build_id = os.environ["BUILD_ID"]
version = f"{get_version_from_file()}.dev{build_id}+{commit}"
# otherwise, if there are no COMMIT_SHA and BUILD_ID, we assume it is a local build
try:
commit = os.environ["BUILD_COMMIT_SHORT_SHA"]
build_id = os.environ["BUILD_ID"]
version = f"{get_version_from_file()}.dev{build_id}+{commit}"
except KeyError:
version = get_version_from_file()
return version
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment