Mercurial > piecrust2
comparison piecrust/commands/builtin/publishing.py @ 954:d709429f02eb
publish: Add more options for logging, better feedback when it fails.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 05 Oct 2017 21:30:25 -0700 |
parents | 13e8b50a2113 |
children |
comparison
equal
deleted
inserted
replaced
953:e04f2ad5f931 | 954:d709429f02eb |
---|---|
16 def setupParser(self, parser, app): | 16 def setupParser(self, parser, app): |
17 parser.add_argument( | 17 parser.add_argument( |
18 '--log-publisher', | 18 '--log-publisher', |
19 metavar='LOG_FILE', | 19 metavar='LOG_FILE', |
20 help="Log the publisher's output to a given file.") | 20 help="Log the publisher's output to a given file.") |
21 parser.add_argument( | |
22 '--log-debug-info', | |
23 action='store_true', | |
24 help="Add some debug info as a preamble to the log file.") | |
25 parser.add_argument( | |
26 '--append-log', | |
27 action='store_true', | |
28 help="Append to the log file if it exists.") | |
21 parser.add_argument( | 29 parser.add_argument( |
22 '--preview', | 30 '--preview', |
23 action='store_true', | 31 action='store_true', |
24 help="Only preview what the publisher would do.") | 32 help="Only preview what the publisher would do.") |
25 | 33 |
60 pub = PublishingManager(ctx.appfactory, ctx.app) | 68 pub = PublishingManager(ctx.appfactory, ctx.app) |
61 pub.run( | 69 pub.run( |
62 ctx.args.target, | 70 ctx.args.target, |
63 preview=ctx.args.preview, | 71 preview=ctx.args.preview, |
64 extra_args=ctx.args, | 72 extra_args=ctx.args, |
65 log_file=ctx.args.log_publisher) | 73 log_file=ctx.args.log_publisher, |
74 log_debug_info=ctx.args.log_debug_info, | |
75 append_log_file=ctx.args.append_log) | |
66 | 76 |