Index: utils/pub/command_lish.dart |
=================================================================== |
--- utils/pub/command_lish.dart (revision 18294) |
+++ utils/pub/command_lish.dart (working copy) |
@@ -32,6 +32,8 @@ |
var parser = new ArgParser(); |
// TODO(nweiz): Use HostedSource.defaultUrl as the default value once we use |
// dart:io for HTTPS requests. |
+ parser.addFlag('dry-run', abbr: 'n', negatable: false, |
+ help: 'Preview publishing the package'); |
parser.addOption('server', defaultsTo: 'https://pub.dartlang.org', |
help: 'The package server to which to upload this package'); |
return parser; |
@@ -158,6 +160,12 @@ |
"http://pub.dartlang.org/doc/pub-lish.html.\n"; |
} |
+ if (commandOptions['dry-run']){ |
+ var s = warnings.length == 1 ? '' : 's'; |
+ log.warning("Package has ${warnings.length} warning$s."); |
+ exit(0); |
Bob Nystrom
2013/02/11 18:44:37
We're trying to move away from explicitly calling
keertip
2013/02/11 23:57:31
Done.
|
+ } |
+ |
var message = 'Looks great! Are you ready to upload your package'; |
if (!warnings.isEmpty) { |