From bbc6e4cc36c355fa6180980abd231673dc15115d Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 12 Sep 2026 11:23:48 +0200 Subject: [PATCH] Fix flatpak release build --- tools/gen_flatpak_manifest.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/gen_flatpak_manifest.py b/tools/gen_flatpak_manifest.py index 15393442..05f61fd9 100755 --- a/tools/gen_flatpak_manifest.py +++ b/tools/gen_flatpak_manifest.py @@ -73,14 +73,12 @@ if __name__ == "__main__": 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_commit = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=root).decode().strip() if args.git or args.gitlocal: template = template.replace("WIVRN_SRC1", "type: git") @@ -88,15 +86,19 @@ if __name__ == "__main__": template = template.replace("WIVRN_SRC2", f"url: {args.git}") else: template = template.replace("WIVRN_SRC2", f"url: {root}") - template = template.replace("WIVRN_SRC3", f"tag: {git_commit}") + template = template.replace("WIVRN_SRC3", f"commit: {git_commit}") else: template = template.replace("WIVRN_SRC1", "type: dir") 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) + if git_tag != "": + template = template.replace("WIVRN_GIT_DESC", "") + template = template.replace("WIVRN_GIT_COMMIT", "") + else: + template = template.replace("WIVRN_GIT_DESC", git_desc) + template = template.replace("WIVRN_GIT_COMMIT", git_commit) template = template.replace("BOOST_URL", boost_url) template = template.replace("BOOST_SHA256", boost_sha256)