aboutsummaryrefslogtreecommitdiff
path: root/releng/cli.py
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-06-06 14:40:59 -0700
committerJade Lovelace <lix@jade.fyi>2024-06-06 20:53:08 -0700
commit98e847514795f53f485b6dbd029ecb545ce38236 (patch)
tree55404594100708d07967abcd5a9941a17e969999 /releng/cli.py
parentbdf1b264add2a6e9aafab186e5c9b4bddb097b64 (diff)
releng: support pushing the manual to docs also
Change-Id: Ifd0b51425ee4955e0230fb2804a6f54ef0fe16e9
Diffstat (limited to 'releng/cli.py')
-rw-r--r--releng/cli.py33
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.")