Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test, move remaining packages to 2.12.0
  • Loading branch information
Chris Yang committed Apr 23, 2021
commit 31e98bf44202f333e92c1d3d703cf674fbf6cb2d
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ flutter:
uses-material-design: true

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.20.0"
2 changes: 1 addition & 1 deletion packages/android_alarm_manager/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ flutter:
pluginClass: AndroidAlarmManagerPlugin

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.20.0"
2 changes: 1 addition & 1 deletion packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.22.0"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Demonstrates how to use the google_maps_flutter plugin.
publish_to: none

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.22.0"

dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ flutter:
pluginClass: FLTGoogleMapsPlugin

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.22.0"
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ dev_dependencies:
pedantic: ^1.10.0

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.9.1+hotfix.4"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ flutter:
pluginClass: none

environment:
sdk: '>=2.12.0-259.9.beta <3.0.0'
sdk: '>=2.12.0 <3.0.0'
flutter: ">=1.20.0"

dependencies:
Expand Down
18 changes: 18 additions & 0 deletions script/tool/test/publish_check_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@ void main() {
expect(() => runner.run(<String>['publish-check']),
throwsA(isA<ToolExit>()));
});

test('fail on prerelease', () async {
createFakePlugin('d');

const String preReleaseOutput = 'Package has 1 warning.'
'Packages with an SDK constraint on a pre-release of the Dart SDK should themselves be published as a pre-release version.';

final MockProcess process = MockProcess();
process.stdoutController.add(preReleaseOutput.codeUnits);
process.stdoutController.close(); // ignore: unawaited_futures
process.stderrController.close(); // ignore: unawaited_futures

process.exitCodeCompleter.complete(1);

processRunner.processesToReturn.add(process);

expect(runner.run(<String>['publish-check']), throwsA(isA<ToolExit>()));
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need a new test that the same setup fails without --allow-pre-release

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

});
}

Expand Down