From e3b22a87e429c3377165aedadcbd966a091636b6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Nov 2022 17:07:32 +0530 Subject: [PATCH] Upload static kitty-tool builds when publishing --- publish.py | 10 ++++++++++ setup.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/publish.py b/publish.py index 12c60af14..53857b077 100755 --- a/publish.py +++ b/publish.py @@ -3,6 +3,7 @@ import argparse import datetime +import glob import io import json import mimetypes @@ -79,6 +80,7 @@ def run_build(args: Any) -> None: call(f'python ../bypy linux --arch {x} shutdown', echo=True) cmd = 'python ../bypy macos program --sign-installers --notarize' run_with_retry(cmd) + call('./setup.py build-static-binaries') def run_tag(args: Any) -> None: @@ -393,6 +395,14 @@ def files_for_upload() -> Dict[str, str]: raise SystemExit(f'The installer {path} does not exist') files[path] = desc signatures[path] = f'GPG signature for {desc}' + b = len(files) + for path in glob.glob('build/static/kitty-tool-*'): + path = os.path.abspath(path) + files[path] = 'Static kitty-tool executable' + signatures[path] = 'GPG signature for static kitty-tool executable' + if len(files) == b: + raise SystemExit('No static binaries found') + files[f'build/kitty-{version}.tar.xz'] = 'Source code' files[f'build/kitty-{version}.tar.xz.sig'] = 'Source code GPG signature' for path, desc in signatures.items(): diff --git a/setup.py b/setup.py index b012b7ce2..b9859d6fa 100755 --- a/setup.py +++ b/setup.py @@ -64,7 +64,7 @@ class Options(argparse.Namespace): verbose: int = 0 sanitize: bool = False prefix: str = './linux-package' - dir_for_static_binaries: str = '' + dir_for_static_binaries: str = 'build/static' incremental: bool = True profile: bool = False libdir_name: str = 'lib'