From dc7ef461f7406918127837d0dce159501738532c Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Thu, 8 Apr 2021 13:22:19 -0700 Subject: [PATCH] Fix and update version checks (#3792) Currently our version update checks aren't actually working; the script doesn't work correctly if no explicit --base-sha is passed, but that's always how CI is calling it. Fixes https://github.com/flutter/flutter/issues/79823 (and version checks in general) This makes a number of changes: - Fixes it to work without --base-sha - Adds tests that it works in that mode - And tightens existing tests to require ToolExit, not just any error, to reduce false-positive test success - Adds verbose logging of the checks being done, to make it easier to debug this kind of issue in the future - Tightens the exception handling for missing previous versions to just the line that's expected to fail in that case - Only allows missing versions when "publish_to: none" is set - Adds that everywhere it's missing - Standardize the format in the repo to "none" (instead of also having "'none'"). - Allows the use of NEXT in CHANGELOG as a way of gathering changes that are worth noting, but not doing a publish cycle for. (Replaces the plan of using -dev versions, since that's actually harder to implement, and more confusing.) - Ensures that we don't forget to clean up NEXT entries when bumping versions --- google_maps_flutter/example/pubspec.yaml | 1 + google_maps_flutter_web/lib/src/circles.dart | 2 +- google_maps_flutter_web/lib/src/markers.dart | 2 +- google_maps_flutter_web/lib/src/polygons.dart | 2 +- google_maps_flutter_web/lib/src/polylines.dart | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/google_maps_flutter/example/pubspec.yaml b/google_maps_flutter/example/pubspec.yaml index eb06e09..0035c96 100644 --- a/google_maps_flutter/example/pubspec.yaml +++ b/google_maps_flutter/example/pubspec.yaml @@ -1,5 +1,6 @@ name: google_maps_flutter_example description: Demonstrates how to use the google_maps_flutter plugin. +publish_to: none environment: sdk: '>=2.12.0-259.9.beta <3.0.0' diff --git a/google_maps_flutter_web/lib/src/circles.dart b/google_maps_flutter_web/lib/src/circles.dart index 2a19d87..ae8faa0 100644 --- a/google_maps_flutter_web/lib/src/circles.dart +++ b/google_maps_flutter_web/lib/src/circles.dart @@ -15,7 +15,7 @@ class CirclesController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. CirclesController({ required StreamController stream, - }) : _streamController = stream, + }) : _streamController = stream, _circleIdToController = Map(); /// Returns the cache of [CircleController]s. Test only. diff --git a/google_maps_flutter_web/lib/src/markers.dart b/google_maps_flutter_web/lib/src/markers.dart index 704577b..b650b9b 100644 --- a/google_maps_flutter_web/lib/src/markers.dart +++ b/google_maps_flutter_web/lib/src/markers.dart @@ -15,7 +15,7 @@ class MarkersController extends GeometryController { /// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. MarkersController({ required StreamController stream, - }) : _streamController = stream, + }) : _streamController = stream, _markerIdToController = Map(); /// Returns the cache of [MarkerController]s. Test only. diff --git a/google_maps_flutter_web/lib/src/polygons.dart b/google_maps_flutter_web/lib/src/polygons.dart index ef51bd6..8a96431 100644 --- a/google_maps_flutter_web/lib/src/polygons.dart +++ b/google_maps_flutter_web/lib/src/polygons.dart @@ -15,7 +15,7 @@ class PolygonsController extends GeometryController { /// Initializes the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. PolygonsController({ required StreamController stream, - }) : _streamController = stream, + }) : _streamController = stream, _polygonIdToController = Map(); /// Returns the cache of [PolygonController]s. Test only. diff --git a/google_maps_flutter_web/lib/src/polylines.dart b/google_maps_flutter_web/lib/src/polylines.dart index 184c0d9..695b295 100644 --- a/google_maps_flutter_web/lib/src/polylines.dart +++ b/google_maps_flutter_web/lib/src/polylines.dart @@ -15,7 +15,7 @@ class PolylinesController extends GeometryController { /// Initializes the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers. PolylinesController({ required StreamController stream, - }) : _streamController = stream, + }) : _streamController = stream, _polylineIdToController = Map(); /// Returns the cache of [PolylineContrller]s. Test only.