diff options
Diffstat (limited to 'releng/cli.py')
-rw-r--r-- | releng/cli.py | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/releng/cli.py b/releng/cli.py index 7db8a80f9..bba50f534 100644 --- a/releng/cli.py +++ b/releng/cli.py @@ -4,7 +4,13 @@ import sys def do_build(args): - create_release.build_artifacts(no_check_git=args.no_check_git) + if args.target == 'all': + create_release.build_artifacts(no_check_git=args.no_check_git) + elif args.target == 'manual': + eval_result = create_release.eval_jobs() + create_release.build_manual(eval_result) + else: + raise ValueError('invalid target, unreachable') def do_tag(args): @@ -14,8 +20,14 @@ def do_tag(args): def do_upload(args): create_release.setup_creds() - create_release.upload_artifacts(force_push_tag=args.force_push_tag, - noconfirm=args.noconfirm) + if args.target == 'all': + create_release.upload_artifacts(force_push_tag=args.force_push_tag, + noconfirm=args.noconfirm) + elif args.target == 'manual': + create_release.upload_manual() + else: + raise ValueError('invalid target, unreachable') + def do_prepare(args): create_release.prepare_release_notes() @@ -32,7 +44,9 @@ def main(): sps = ap.add_subparsers() - prepare = sps.add_parser('prepare', help='Prepares for a release by moving the release notes over.') + prepare = sps.add_parser( + 'prepare', + help='Prepares for a release by moving the release notes over.') prepare.set_defaults(cmd=do_prepare) tag = sps.add_parser( @@ -49,13 +63,16 @@ def main(): tag.set_defaults(cmd=do_tag) build = sps.add_parser( - 'release', + 'build', help= 'Build an artifacts/ directory with the things that would be released') build.add_argument( '--no-check-git', action='store_true', help="Don't check git state before building. For testing.") + build.add_argument('--target', + choices=['manual', 'all'], + help='Whether to build everything or just the manual') build.set_defaults(cmd=do_build) upload = sps.add_parser( @@ -64,6 +81,12 @@ def main(): action='store_true', help='Force push the tag. For testing.') upload.add_argument( + '--target', + choices=['manual', 'all'], + default='all', + help='Whether to upload a release or just the nightly/otherwise manual' + ) + upload.add_argument( '--noconfirm', action='store_true', help="Don't ask for confirmation. For testing/automation.") |