1
0
Fork 0
mirror of https://github.com/subosito/flutter-action.git synced 2024-08-16 10:19:50 +02:00

fix checkout, add tests

This commit is contained in:
Gustl22 2023-07-05 15:52:45 +02:00
parent 9d9c8bf7e1
commit feb8198036
3 changed files with 7 additions and 2 deletions

View file

@ -111,6 +111,10 @@ jobs:
shell: bash
- run: ./setup.sh -t -p -n 5b12b74 master | grep 'flutter-macos-master-5b12b74-x64-master'
shell: bash
- run: ./setup.sh -t -p -n 3.12.0-12.0.pre master | grep 'flutter-macos-master-3.12.0-12.0.pre-x64-master'
shell: bash
- run: ./setup.sh -t -p -n stable master | grep 'flutter-macos-master-stable-x64-master'
shell: bash
- run: ./setup.sh -t -p -n 2 any | grep 'flutter-macos-beta-2.13.0-0.4.pre-x64-25caf1461b8f643092a9f6f5b224453b5c057d10'
shell: bash
- run: ./setup.sh -t -p -n 1 any | grep 'flutter-macos-beta-1.26.0-17.8.pre-x64-044f2cf5607a26f8818dab0f766400e85c52bdff'

View file

@ -58,7 +58,7 @@ steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '5b12b7467fcbbdc7351d76690ce8a8693e804179' # tag, commit or branch
flutter-version: '5b12b74' # tag, commit or branch
channel: 'master'
- run: flutter --version
```

View file

@ -158,7 +158,8 @@ if [[ ! -x "$CACHE_PATH/bin/flutter" ]]; then
if [[ "$CHANNEL" == "master" ]]; then
git clone -b master https://github.com/flutter/flutter.git "$CACHE_PATH"
if [[ "$VERSION" != "any" ]]; then
git checkout "$VERSION"
git config --global --add safe.directory "$CACHE_PATH"
(cd "$CACHE_PATH" && git checkout "$VERSION")
fi
else
archive_url=$(echo "$VERSION_MANIFEST" | jq -r '.archive')