Skip to content

Commit

Permalink
Fix and update version checks (#3792)
Browse files Browse the repository at this point in the history
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 flutter/flutter#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
  • Loading branch information
stuartmorgan committed Apr 8, 2021
1 parent 7f772fe commit dc7ef46
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions 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'
Expand Down
2 changes: 1 addition & 1 deletion google_maps_flutter_web/lib/src/circles.dart
Expand Up @@ -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<MapEvent> stream,
}) : _streamController = stream,
}) : _streamController = stream,
_circleIdToController = Map<CircleId, CircleController>();

/// Returns the cache of [CircleController]s. Test only.
Expand Down
2 changes: 1 addition & 1 deletion google_maps_flutter_web/lib/src/markers.dart
Expand Up @@ -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<MapEvent> stream,
}) : _streamController = stream,
}) : _streamController = stream,
_markerIdToController = Map<MarkerId, MarkerController>();

/// Returns the cache of [MarkerController]s. Test only.
Expand Down
2 changes: 1 addition & 1 deletion google_maps_flutter_web/lib/src/polygons.dart
Expand Up @@ -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<MapEvent> stream,
}) : _streamController = stream,
}) : _streamController = stream,
_polygonIdToController = Map<PolygonId, PolygonController>();

/// Returns the cache of [PolygonController]s. Test only.
Expand Down
2 changes: 1 addition & 1 deletion google_maps_flutter_web/lib/src/polylines.dart
Expand Up @@ -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<MapEvent> stream,
}) : _streamController = stream,
}) : _streamController = stream,
_polylineIdToController = Map<PolylineId, PolylineController>();

/// Returns the cache of [PolylineContrller]s. Test only.
Expand Down

0 comments on commit dc7ef46

Please sign in to comment.