diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index eaa7efc0362a..64198043641e 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.25 + +* Moved exit command to bin/ from lib/ + ## 0.1.24 * Moved logic from bin/ to lib/ to help customers wrap up the behavior. diff --git a/packages/pigeon/bin/pigeon.dart b/packages/pigeon/bin/pigeon.dart index ec65f9d3eb7b..9355f575fb5a 100644 --- a/packages/pigeon/bin/pigeon.dart +++ b/packages/pigeon/bin/pigeon.dart @@ -4,8 +4,9 @@ // @dart = 2.2 +import 'dart:io'; import 'package:pigeon/pigeon_cl.dart'; Future main(List args) async { - await runCommandLine(args); + exit(await runCommandLine(args)); } diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart index c1cf021ee9c0..44500fcfdc32 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -8,7 +8,7 @@ import 'dart:mirrors'; import 'ast.dart'; /// The current version of pigeon. This must match the version in pubspec.yaml. -const String pigeonVersion = '0.2.0'; +const String pigeonVersion = '0.2.1'; /// Read all the content from [stdin] to a String. String readStdin() { diff --git a/packages/pigeon/lib/pigeon_cl.dart b/packages/pigeon/lib/pigeon_cl.dart index de70005bfc5c..096c4820a2b2 100644 --- a/packages/pigeon/lib/pigeon_cl.dart +++ b/packages/pigeon/lib/pigeon_cl.dart @@ -27,7 +27,7 @@ String _posixRelative(String input, {required String from}) { /// This is the main entrypoint for the command-line tool. [args] are the /// commmand line arguments and there is an optional [packageConfig] to /// accomodate users that want to integrate pigeon with other build systems. -Future runCommandLine(List args, {Uri? packageConfig}) async { +Future runCommandLine(List args, {Uri? packageConfig}) async { final PigeonOptions opts = Pigeon.parseArgs(args); final Directory tempDir = Directory.systemTemp.createTempSync( 'flutter_pigeon.', @@ -71,5 +71,5 @@ void main(List args, SendPort sendPort) async { }); final int exitCode = await completer.future; tempDir.deleteSync(recursive: true); - exit(exitCode); + return exitCode; } diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index 8d041a398865..06278fc0e288 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -1,5 +1,5 @@ name: pigeon -version: 0.2.0 # This must match the version in lib/generator_tools.dart +version: 0.2.1 # This must match the version in lib/generator_tools.dart description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. homepage: https://github.com/flutter/packages/tree/master/packages/pigeon dependencies: