Skip to content

Commit 1d04244

Browse files
committed
Fix macos_arm64 download url
1 parent 0eac774 commit 1d04244

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

action.sh

Lines changed: 15 additions & 8 deletions
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
@@ -44,8 +37,15 @@ FLUTTER_PUB_CACHE="${RUNNER_TEMP}/pub-cache"
4437
# https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.0.2-stable.zip
4538
FLUTTER_RELEASE_URL="https://storage.googleapis.com/flutter_infra_release/releases"
4639

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

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

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

6774
echo "Downloading ${FLUTTER_DOWNLOAD_URL}"

0 commit comments

Comments
 (0)