cmake: explicit GIT_TAG for releases
Tagged versions shouls use GIT_TAG instead of GIT_DESC+GIT_COMMIT When using GIT_TAG, apk download will be done from WiVRn releases In other cases, GIT_COMMIT will be used to download from WiVRn-APK releases. If none is set, git is used to compute the values
This commit is contained in:
@@ -63,20 +63,23 @@ if __name__ == "__main__":
|
||||
boost_sha256 = cmake.get("boost", "URL_HASH").split("=")[-1]
|
||||
|
||||
try:
|
||||
git_commit = subprocess.check_output(
|
||||
git_tag = subprocess.check_output(
|
||||
["git", "describe", "--exact-match", "--tags"],
|
||||
cwd=root,
|
||||
stderr=subprocess.DEVNULL
|
||||
).decode().strip()
|
||||
git_commit = ""
|
||||
git_desc = ""
|
||||
except subprocess.CalledProcessError:
|
||||
git_tag = ""
|
||||
git_commit = subprocess.check_output(
|
||||
["git", "rev-parse", "HEAD"],
|
||||
cwd=root
|
||||
).decode().strip()
|
||||
git_desc = subprocess.check_output(
|
||||
["git", "describe", "--tags", "--always"],
|
||||
cwd=root
|
||||
).decode().strip()
|
||||
git_desc = subprocess.check_output(
|
||||
["git", "describe", "--tags", "--always"],
|
||||
cwd=root
|
||||
).decode().strip()
|
||||
|
||||
if args.git or args.gitlocal:
|
||||
template = template.replace("WIVRN_SRC1", "type: git")
|
||||
@@ -90,6 +93,7 @@ if __name__ == "__main__":
|
||||
template = template.replace("WIVRN_SRC2", f"path: {root}")
|
||||
template = template.replace("WIVRN_SRC3", "")
|
||||
|
||||
template = template.replace("WIVRN_GIT_TAG", git_tag)
|
||||
template = template.replace("WIVRN_GIT_DESC", git_desc)
|
||||
template = template.replace("WIVRN_GIT_COMMIT", git_commit)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user