Skip to content

Commit 26aa4d6

Browse files
authored
Update setup.sh
version: latest property support
1 parent f59ff7b commit 26aa4d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ FLUTTER_VERSION=${1:-3.0.2}
99
FLUTTER_CHANNEL=${2:-stable}
1010
FLUTTER_OS=$OS
1111

12+
# Detect the latest version
13+
if [[ $FLUTTER_VERSION == latest ]]
14+
then
15+
FLUTTER_VERSION=$(curl -s https://storage.googleapis.com/flutter_infra_release/releases/releases_$OS.json | jq -r ".releases | map(select(.channel == \"${FLUTTER_CHANNEL}\")) | .[0].version")
16+
fi
17+
1218
# OS archive file extension
1319
EXT="zip"
1420
if [[ $OS == linux ]]

0 commit comments

Comments
 (0)