mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-25 16:45:27 +00:00
wip build script, playing with buildkite logging
This commit is contained in:
parent
7c3e28870e
commit
7300d1caa8
1 changed files with 9 additions and 3 deletions
10
build.py
10
build.py
|
@ -82,7 +82,9 @@ def build_lib(build_name, generator, options):
|
|||
for key in options:
|
||||
val = 'ON' if options[key] else 'OFF'
|
||||
initial_cmake.append('-D%s=%s' % (key, val))
|
||||
click.echo('--- Building ' + build_name)
|
||||
subprocess.check_call(initial_cmake)
|
||||
if not IS_BUILD_MACHINE:
|
||||
subprocess.check_call(['cmake', '--build', '.', '--config', 'Debug'])
|
||||
subprocess.check_call(['cmake', '--build', '.', '--config', 'Release', '--target', 'install'])
|
||||
|
||||
|
@ -90,6 +92,7 @@ def build_lib(build_name, generator, options):
|
|||
@cli.command()
|
||||
def archive():
|
||||
""" create zip of install dir """
|
||||
click.echo('--- Archiving')
|
||||
archive_file_path = os.path.join(SCRIPT_PATH, 'builds', 'discord-rpc-%s.zip' % get_platform())
|
||||
archive_file = zipfile.ZipFile(archive_file_path, 'w', zipfile.ZIP_DEFLATED)
|
||||
archive_src_base_path = os.path.join(SCRIPT_PATH, 'builds', 'install')
|
||||
|
@ -98,7 +101,9 @@ def archive():
|
|||
for path, _, filenames in os.walk('.'):
|
||||
for fname in filenames:
|
||||
fpath = os.path.join(path, fname)
|
||||
archive_file.write(fpath, os.path.normpath(os.path.join(archive_dst_base_path, fpath)))
|
||||
dst_path = os.path.normpath(os.path.join(archive_dst_base_path, fpath))
|
||||
click.echo('Adding ' + dst_path)
|
||||
archive_file.write(fpath, dst_path)
|
||||
|
||||
|
||||
@cli.command()
|
||||
|
@ -134,13 +139,14 @@ def sign(install_paths, tool):
|
|||
click.secho('Not signing things on this platform yet', fg='red')
|
||||
return
|
||||
|
||||
click.echo('--- Signing')
|
||||
for install_path in install_paths:
|
||||
for fname in os.listdir(install_path):
|
||||
ext = os.path.splitext(fname)[1]
|
||||
if ext not in signable_extensions:
|
||||
continue
|
||||
fpath = os.path.join(install_path, fname)
|
||||
click.secho("sign '%s'" % (fpath), fg='yellow')
|
||||
click.echo('Sign ' + fpath)
|
||||
sign_command = sign_command_base + [fpath]
|
||||
subprocess.check_call(sign_command)
|
||||
|
||||
|
|
Loading…
Reference in a new issue