| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library command_lish; | 5 library command_lish; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:json'; | 8 import 'dart:json'; |
| 9 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| 11 import '../../pkg/args/lib/args.dart'; | 11 import '../../pkg/args/lib/args.dart'; |
| 12 import '../../pkg/http/lib/http.dart' as http; | 12 import '../../pkg/http/lib/http.dart' as http; |
| 13 import '../../pkg/path/lib/path.dart' as path; |
| 13 import 'directory_tree.dart'; | 14 import 'directory_tree.dart'; |
| 14 import 'git.dart' as git; | 15 import 'git.dart' as git; |
| 15 import 'http.dart'; | 16 import 'http.dart'; |
| 16 import 'io.dart'; | 17 import 'io.dart'; |
| 17 import 'log.dart' as log; | 18 import 'log.dart' as log; |
| 18 import 'oauth2.dart' as oauth2; | 19 import 'oauth2.dart' as oauth2; |
| 19 import 'path.dart' as path; | |
| 20 import 'pub.dart'; | 20 import 'pub.dart'; |
| 21 import 'validator.dart'; | 21 import 'validator.dart'; |
| 22 | 22 |
| 23 /// Handles the `lish` and `publish` pub commands. | 23 /// Handles the `lish` and `publish` pub commands. |
| 24 class LishCommand extends PubCommand { | 24 class LishCommand extends PubCommand { |
| 25 final description = "Publish the current package to pub.dartlang.org."; | 25 final description = "Publish the current package to pub.dartlang.org."; |
| 26 final usage = "pub publish [options]"; | 26 final usage = "pub publish [options]"; |
| 27 final aliases = const ["lish", "lush"]; | 27 final aliases = const ["lish", "lush"]; |
| 28 | 28 |
| 29 ArgParser get commandParser { | 29 ArgParser get commandParser { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 var s = warnings.length == 1 ? '' : 's'; | 175 var s = warnings.length == 1 ? '' : 's'; |
| 176 message = "Package has ${warnings.length} warning$s. Upload anyway"; | 176 message = "Package has ${warnings.length} warning$s. Upload anyway"; |
| 177 } | 177 } |
| 178 | 178 |
| 179 return confirm(message).transform((confirmed) { | 179 return confirm(message).transform((confirmed) { |
| 180 if (!confirmed) throw "Package upload canceled."; | 180 if (!confirmed) throw "Package upload canceled."; |
| 181 }); | 181 }); |
| 182 }); | 182 }); |
| 183 } | 183 } |
| 184 } | 184 } |
| OLD | NEW |