metadata.py: update tagging considering github CI builds (#1782)
This commit is contained in:
@@ -35,7 +35,10 @@ def load_json(filename: str):
|
|||||||
return json.loads(f.read())
|
return json.loads(f.read())
|
||||||
|
|
||||||
def read_git_tag():
|
def read_git_tag():
|
||||||
return f"{subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD']).strip().decode('ascii').upper()}"
|
if os.environ.get("GITHUB_CI_PR_SHA", "") != "":
|
||||||
|
return os.environ["GITHUB_CI_PR_SHA"][:7].upper()
|
||||||
|
else:
|
||||||
|
return f"{subprocess.check_output(['git', 'rev-parse', '--short=7', 'HEAD']).strip().decode('ascii').upper()}"
|
||||||
|
|
||||||
def read_version():
|
def read_version():
|
||||||
with open(HERE / "version.h") as version_file:
|
with open(HERE / "version.h") as version_file:
|
||||||
|
|||||||
Reference in New Issue
Block a user