From 692741daf3a2cc1c8c2694877a5de5634a3c428a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 15 Aug 2019 19:54:52 -0400 Subject: [PATCH] feat: add archive command This does everything short of the "deploy" step. --- bob/cli.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bob/cli.py b/bob/cli.py index 16a568d..3cb1de2 100644 --- a/bob/cli.py +++ b/bob/cli.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- """Usage: bob build [--name=FILE] + bob archive [--overwrite] [--name=] bob deploy [--overwrite] [--name=] Build formula and optionally deploy it. @@ -37,12 +38,18 @@ def build(formula, name=None): return f -def deploy(formula, overwrite, name): +def archive(formula, overwrite, name): f = build(formula, name) print('Archiving.') f.archive() + return f + + +def deploy(formula, overwrite, name): + f = archive(formula, overwrite, name) + print('Deploying.') f.deploy(allow_overwrite=overwrite) @@ -52,6 +59,7 @@ def main(): formula = args[''] do_build = args['build'] + do_archive = args['archive'] do_deploy = args['deploy'] do_overwrite = args['--overwrite'] do_name = args['--name'] @@ -59,6 +67,9 @@ def main(): if do_build: build(formula, name=do_name) + if do_archive: + archive(formula, overwrite=do_overwrite, name=do_name) + if do_deploy: deploy(formula, overwrite=do_overwrite, name=do_name)