Skip to content

Commit d328a81

Browse files
committed
Fix macos_arm64 download url
1 parent a06f128 commit d328a81

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

setup.sh

+15-8
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ then
1919
rm "${RUNNER_TEMP}/flutter_release.json"
2020
fi
2121

22-
# OS archive file extension
23-
EXT="zip"
24-
if [[ $OS == linux ]]
25-
then
26-
EXT="tar.xz"
27-
fi
28-
2922
# Apple Intel or Apple Silicon
3023
if [[ $OS == "macos" && $ARCH == "arm64" && $FLUTTER_VERSION < 3.* ]]
3124
then
@@ -43,8 +36,15 @@ FLUTTER_RUNNER_TOOL_CACHE="${RUNNER_TOOL_CACHE}/flutter-${RUNNER_OS}-${FLUTTER_V
4336
# https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.0.2-stable.zip
4437
FLUTTER_RELEASE_URL="https://storage.googleapis.com/flutter_infra_release/releases"
4538

39+
# OS archive file extension
40+
EXT="zip"
41+
if [[ $OS == "linux" ]]
42+
then
43+
EXT="tar.xz"
44+
fi
4645

4746
if [ ! -d "${FLUTTER_RUNNER_TOOL_CACHE}" ]; then
47+
FLUTTER_BUILD_OS=$FLUTTER_OS
4848
echo "Installing Flutter SDK version \"${FLUTTER_VERSION}\" from the ${FLUTTER_CHANNEL} channel on ${FLUTTER_OS}"
4949

5050
# Linux
@@ -60,7 +60,14 @@ if [ ! -d "${FLUTTER_RUNNER_TOOL_CACHE}" ]; then
6060
# Windows
6161
# /stable /windows/ flutter_windows_3.0.2-stable.zip
6262
# /beta /windows/ flutter_windows_3.1.0-9.0.pre-beta.zip
63-
FLUTTER_BUILD="flutter_${FLUTTER_OS}_${FLUTTER_VERSION}-${FLUTTER_CHANNEL}.${EXT}"
63+
64+
# Apple Intel or Apple Silicon
65+
if [[ $OS == "macos" && $ARCH == "arm64" ]]
66+
then
67+
FLUTTER_BUILD_OS="macos_arm64"
68+
fi
69+
70+
FLUTTER_BUILD="flutter_${FLUTTER_BUILD_OS}_${FLUTTER_VERSION}-${FLUTTER_CHANNEL}.${EXT}"
6471
FLUTTER_DOWNLOAD_URL="${FLUTTER_RELEASE_URL}/${FLUTTER_CHANNEL}/${FLUTTER_OS}/${FLUTTER_BUILD}"
6572

6673
echo "Downloading ${FLUTTER_DOWNLOAD_URL}"

0 commit comments

Comments
 (0)