Compare commits

..
1 Commits
Author SHA1 Message Date
John Colvin edae3c9ab7 build (refactor): Remove 'zip' opt from publish_spark
The slight convenience afforded by this opt doesn't seem worth the
additional complexity. This script produces a self-contained application
folder. Decisions on what to do with that folder (whether or not to zip
it, etc.) are best left upstream.
2022-12-23 11:40:35 -05:00
-16
View File
@@ -1,9 +1,6 @@
import argparse
import os
from pathlib import Path
import subprocess
from core.argparse_utils import add_toggle_opt
from build_spark import build
from build_spark import SparkPaths
@@ -12,12 +9,6 @@ def _get_arg_parser():
parser = argparse.ArgumentParser(
description='Publish a self-contined spark client application')
add_toggle_opt(
parser, 'zip', help='Whether or not to zip the build folder')
parser.add_argument(
'--build-id', help='A unique identifier for this build')
parser.add_argument(
'-o',
'--output-dir',
@@ -53,13 +44,6 @@ def _main():
targets=['publish'],
verbosity=args.verbosity)
if args.zip:
publish_path = output_dir.joinpath(
'Release', 'bin', 'net6.0-windows', 'win-x64', 'publish', '*')
subprocess.run(
f'7z a -mmt=30 spark_client_{args.build_id}.7z {publish_path}',
shell=True)
if __name__ == '__main__':
_main()