Upload static kitty-tool builds when publishing

This commit is contained in:
Kovid Goyal 2022-11-14 17:07:32 +05:30
parent c7d47a59f1
commit e3b22a87e4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 11 additions and 1 deletions

View File

@ -3,6 +3,7 @@
import argparse import argparse
import datetime import datetime
import glob
import io import io
import json import json
import mimetypes import mimetypes
@ -79,6 +80,7 @@ def run_build(args: Any) -> None:
call(f'python ../bypy linux --arch {x} shutdown', echo=True) call(f'python ../bypy linux --arch {x} shutdown', echo=True)
cmd = 'python ../bypy macos program --sign-installers --notarize' cmd = 'python ../bypy macos program --sign-installers --notarize'
run_with_retry(cmd) run_with_retry(cmd)
call('./setup.py build-static-binaries')
def run_tag(args: Any) -> None: 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') raise SystemExit(f'The installer {path} does not exist')
files[path] = desc files[path] = desc
signatures[path] = f'GPG signature for {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'] = 'Source code'
files[f'build/kitty-{version}.tar.xz.sig'] = 'Source code GPG signature' files[f'build/kitty-{version}.tar.xz.sig'] = 'Source code GPG signature'
for path, desc in signatures.items(): for path, desc in signatures.items():

View File

@ -64,7 +64,7 @@ class Options(argparse.Namespace):
verbose: int = 0 verbose: int = 0
sanitize: bool = False sanitize: bool = False
prefix: str = './linux-package' prefix: str = './linux-package'
dir_for_static_binaries: str = '' dir_for_static_binaries: str = 'build/static'
incremental: bool = True incremental: bool = True
profile: bool = False profile: bool = False
libdir_name: str = 'lib' libdir_name: str = 'lib'