repro: introduce -P|--all-pipelines

Fixes #1165

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-09-28 13:33:23 +03:00
parent 04b3cd40e0
commit 669b2ec303
4 changed files with 72 additions and 11 deletions
+9 -1
View File
@@ -439,6 +439,12 @@ def parse_args(argv=None):
default=False,
help='Reproduce the whole pipeline that the '
'specified stage file belongs to.')
repro_parser.add_argument(
'-P',
'--all-pipelines',
action='store_true',
default=False,
help='Reproduce all pipelines in the project.')
repro_parser.set_defaults(func=CmdRepro)
# Remove
@@ -838,7 +844,9 @@ def parse_args(argv=None):
if (issubclass(args.func, CmdRepro)
or issubclass(args.func, CmdPipelineShow)) \
and hasattr(args, 'targets') \
and len(args.targets) == 0:
and len(args.targets) == 0 \
and not (hasattr(args, 'all_pipelines')
and args.all_pipelines):
if hasattr(args, 'cwd'):
cwd = args.cwd
else: