Skip to content

Commit c7fdb36

Browse files
committed
Patch issues with latest Flutter SDK release manifest
This may prevent the workflow from installing older release but the fallback script maybe able to take over attempt to download the old release
1 parent d030cb6 commit c7fdb36

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

action.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ if [ -f "$FLUTTER_RELEASE_MANIFEST_FILE" ]; then
3232
if [[ $FLUTTER_VERSION == "latest" ]]
3333
then
3434
FLUTTER_RELEASE_CURRENT=$(jq -r ".current_release.${FLUTTER_CHANNEL}" "$FLUTTER_RELEASE_MANIFEST_FILE")
35-
__QUERY="select(.hash == \"${FLUTTER_RELEASE_CURRENT}\")"
36-
if [[ $ARCH == "arm64" ]]; then
37-
__QUERY="select(.hash == \"${FLUTTER_RELEASE_CURRENT}\" and .dart_sdk_arch == \"${ARCH}\")"
38-
fi
35+
__QUERY="select(.hash == \"${FLUTTER_RELEASE_CURRENT}\" and .dart_sdk_arch == \"${ARCH}\")"
3936
FLUTTER_RELEASE_VERSION=$(jq -r ".releases | map(${__QUERY}) | .[0].version" "$FLUTTER_RELEASE_MANIFEST_FILE")
4037
FLUTTER_RELEASE_SHA256=$(jq -r ".releases | map(${__QUERY}) | .[0].sha256" "$FLUTTER_RELEASE_MANIFEST_FILE")
4138
FLUTTER_RELEASE_ARCHIVE=$(jq -r ".releases | map(${__QUERY}) | .[0].archive" "$FLUTTER_RELEASE_MANIFEST_FILE")
@@ -44,16 +41,19 @@ if [ -f "$FLUTTER_RELEASE_MANIFEST_FILE" ]; then
4441
FLUTTER_VERSION=$FLUTTER_RELEASE_VERSION
4542
FLUTTER_DOWNLOAD_URL="${FLUTTER_RELEASE_BASE_URL}/${FLUTTER_RELEASE_ARCHIVE}"
4643
else
47-
__QUERY="select(.version == \"${FLUTTER_VERSION}\")"
48-
if [[ $ARCH == "arm64" ]]; then
49-
__QUERY="select(.version == \"${FLUTTER_VERSION}\" and .dart_sdk_arch == \"${ARCH}\")"
50-
fi
44+
__QUERY="select(.version == \"${FLUTTER_VERSION}\" and .dart_sdk_arch == \"${ARCH}\")"
5145
FLUTTER_RELEASE_SHA256=$(jq -r ".releases | map(${__QUERY}) | .[0].sha256" "$FLUTTER_RELEASE_MANIFEST_FILE")
5246
FLUTTER_RELEASE_ARCHIVE=$(jq -r ".releases | map(${__QUERY}) | .[0].archive" "$FLUTTER_RELEASE_MANIFEST_FILE")
5347

5448
# Set the detected version
49+
FLUTTER_RELEASE_VERSION=$FLUTTER_VERSION
5550
FLUTTER_DOWNLOAD_URL="${FLUTTER_RELEASE_BASE_URL}/${FLUTTER_RELEASE_ARCHIVE}"
5651
fi
52+
53+
# Debug information
54+
echo "::debug::FLUTTER_RELEASE_VERSION=$FLUTTER_RELEASE_VERSION"
55+
echo "::debug::FLUTTER_RELEASE_SHA256=$FLUTTER_RELEASE_SHA256"
56+
echo "::debug::FLUTTER_RELEASE_ARCHIVE=$FLUTTER_RELEASE_ARCHIVE"
5757
else
5858
echo -e "::warning::Flutter SDK release manifest not found. Switched to using default fallback download strategy."
5959
fi

0 commit comments

Comments
 (0)