Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: utils/pub/command_lish.dart

Issue 12226077: add --preview flag to publish command (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utils/tests/pub/pub_lish_test.dart » ('j') | utils/tests/pub/pub_lish_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | utils/tests/pub/pub_lish_test.dart » ('j') | utils/tests/pub/pub_lish_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698