Skip to content

Commit 976ff5c

Browse files
authored
use jq to extract version (#981)
1 parent fe736f4 commit 976ff5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/check_api_breakage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
# Get the current stable version of mapbox_maps_flutter on pub.dev
1111
PACKAGE_NAME="mapbox_maps_flutter"
12-
PACKAGE_VERSION=$(curl -s "https://pub.dev/api/packages/$PACKAGE_NAME" | grep -o '"latest":{"version":"[^"]*' | grep -o '[0-9]\+\(\.[0-9]\+\)*')
12+
PACKAGE_VERSION=$(curl -s "https://pub.dev/api/packages/$PACKAGE_NAME") | jq .latest.version
1313
echo "Current stable version of mapbox_maps_flutter: $PACKAGE_VERSION"
1414

1515
# Get the path of local mapbox-maps-flutter

0 commit comments

Comments
 (0)