Use bypy in the publish script

This commit is contained in:
Kovid Goyal 2020-06-06 09:19:48 +05:30
parent 03e0bf4c0e
commit ac6d1ce174
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -21,7 +21,6 @@ from typing import IO, Any, Dict, Iterable, List, Optional, cast
import requests import requests
os.chdir(os.path.dirname(os.path.abspath(__file__))) os.chdir(os.path.dirname(os.path.abspath(__file__)))
build_path = os.path.abspath('../build-kitty')
docs_dir = os.path.abspath('docs') docs_dir = os.path.abspath('docs')
publish_dir = os.path.abspath(os.path.join('..', 'kovidgoyal.github.io', 'kitty')) publish_dir = os.path.abspath(os.path.join('..', 'kovidgoyal.github.io', 'kitty'))
with open('kitty/constants.py') as f: with open('kitty/constants.py') as f:
@ -47,11 +46,10 @@ def call(*cmd: str, cwd: Optional[str] = None) -> None:
def run_build(args: Any) -> None: def run_build(args: Any) -> None:
os.chdir(build_path) call('python ../bypy linux program')
call('./linux 64 kitty') call('python ../bypy linux 32 program')
call('./osx kitty --sign-installers') call('python ../bypy macos program --sign-installers --notarize')
call('./osx shutdown') call('python ../bypy macos shutdown')
call('./linux 32 kitty')
def run_tag(args: Any) -> None: def run_tag(args: Any) -> None:
@ -329,9 +327,9 @@ def get_github_data() -> Dict[str, str]:
def run_upload(args: Any) -> None: def run_upload(args: Any) -> None:
files = { files = {
os.path.join(build_path, 'build', f.format(version)): desc os.path.join('bypy', 'b', f.format(version)): desc
for f, desc in { for f, desc in {
'osx/dist/kitty-{}.dmg': 'macOS dmg', 'macos/dist/kitty-{}.dmg': 'macOS dmg',
'linux/64/sw/dist/kitty-{}-x86_64.txz': 'Linux amd64 binary bundle', 'linux/64/sw/dist/kitty-{}-x86_64.txz': 'Linux amd64 binary bundle',
'linux/32/sw/dist/kitty-{}-i686.txz': 'Linux x86 binary bundle', 'linux/32/sw/dist/kitty-{}-i686.txz': 'Linux x86 binary bundle',
}.items() }.items()