From 86ffd2736581a84db113c9ebe0a91588eb07c66c Mon Sep 17 00:00:00 2001 From: izzalDev Date: Fri, 29 Aug 2025 11:25:42 +0700 Subject: [PATCH 1/2] Switch to extract-all for release-gitter and fix architecture mapping - Replaced `extract-files` with `extract-all = true` for automatic extraction - Added `AMD64 = "x86_64"` mapping for release-gitter - Removed chmod command for Windows compatibility --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 105bdbdf..6bf4c414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "pseudo_builder" [tool.release-gitter] git-url = "https://github.com/JohnnyMorganz/StyLua" -extract-files = ["stylua"] +extract-all = true format = "stylua-{system}-{arch}.zip" -exec = "chmod +x stylua" [tool.release-gitter.map-arch] arm64 = "aarch64" +AMD64 = "x86_64" [tool.release-gitter.map-system] Darwin = "macos" Windows = "windows" From 4b83218e870f3ee5ecc0e250cd6f74971eb877fd Mon Sep 17 00:00:00 2001 From: izzalDev Date: Fri, 29 Aug 2025 16:37:12 +0700 Subject: [PATCH 2/2] fix(build): set StyLua binary executable on Unix via Python exec --- pyproject.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6bf4c414..19fd4464 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,23 @@ build-backend = "pseudo_builder" git-url = "https://github.com/JohnnyMorganz/StyLua" extract-all = true format = "stylua-{system}-{arch}.zip" +exec = """python -c " +import os +import stat +import platform + +f = 'stylua' +s = platform.system() + +if s in ('Linux', 'Darwin') and os.path.exists(f): + current_mode = os.stat(f).st_mode + os.chmod(f, current_mode | stat.S_IEXEC) +" """ + [tool.release-gitter.map-arch] arm64 = "aarch64" AMD64 = "x86_64" + [tool.release-gitter.map-system] Darwin = "macos" Windows = "windows"