Skip to content

Commit

Permalink
Merge pull request #6 from hurelhuyag/main
Browse files Browse the repository at this point in the history
version: latest property value support
  • Loading branch information
socheatsok78 authored Oct 21, 2023
2 parents f59ff7b + 42f0d6a commit 4fd0258
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version:
version:
- latest
- 3.3.0
- 3.0.0
- 2.10.5
Expand Down Expand Up @@ -47,7 +48,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version:
version:
- latest
- 3.3.0-0.0.pre
- 3.1.0
steps:
Expand Down
10 changes: 10 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ FLUTTER_VERSION=${1:-3.0.2}
FLUTTER_CHANNEL=${2:-stable}
FLUTTER_OS=$OS

# Detect the latest version
if [[ $FLUTTER_VERSION == "latest" ]]
then
echo "Detecting latest version..."
curl -L https://storage.googleapis.com/flutter_infra_release/releases/releases_$OS.json -o "${RUNNER_TEMP}/flutter_release.json"
CURRENT_RELEASE=$(jq -r ".current_release.${FLUTTER_CHANNEL}" "${RUNNER_TEMP}/flutter_release.json")
FLUTTER_VERSION=$(jq -r ".releases | map(select(.hash == \"${CURRENT_RELEASE}\")) | .[0].version" "${RUNNER_TEMP}/flutter_release.json")
rm "${RUNNER_TEMP}/flutter_release.json"
fi

# OS archive file extension
EXT="zip"
if [[ $OS == linux ]]
Expand Down

0 comments on commit 4fd0258

Please sign in to comment.