mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
add support for the main
channel (#258)
* add support for the main channel * update testing for the 'main' channel
This commit is contained in:
parent
aa6d9b9844
commit
02b923c0e1
3 changed files with 7 additions and 4 deletions
3
.github/workflows/workflow.yml
vendored
3
.github/workflows/workflow.yml
vendored
|
@ -20,6 +20,9 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
channel: [stable, beta, master]
|
channel: [stable, beta, master]
|
||||||
|
include:
|
||||||
|
- operating-system: ubuntu-latest
|
||||||
|
channel: main
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- id: flutter-action
|
- id: flutter-action
|
||||||
|
|
|
@ -23,7 +23,7 @@ steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable' # or: 'beta', 'dev' or 'master'
|
channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main')
|
||||||
- run: flutter --version
|
- run: flutter --version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
6
setup.sh
6
setup.sh
|
@ -98,7 +98,7 @@ else
|
||||||
RELEASE_MANIFEST=$(curl --silent --connect-timeout 15 --retry 5 "$MANIFEST_URL")
|
RELEASE_MANIFEST=$(curl --silent --connect-timeout 15 --retry 5 "$MANIFEST_URL")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CHANNEL" == "master" ]]; then
|
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
|
||||||
VERSION_MANIFEST="{\"channel\":\"$CHANNEL\",\"version\":\"$VERSION\",\"dart_sdk_arch\":\"$ARCH\",\"hash\":\"$CHANNEL\",\"sha256\":\"$CHANNEL\"}"
|
VERSION_MANIFEST="{\"channel\":\"$CHANNEL\",\"version\":\"$VERSION\",\"dart_sdk_arch\":\"$ARCH\",\"hash\":\"$CHANNEL\",\"sha256\":\"$CHANNEL\"}"
|
||||||
else
|
else
|
||||||
VERSION_MANIFEST=$(echo "$RELEASE_MANIFEST" | filter_by_channel "$CHANNEL" | filter_by_arch "$ARCH" | filter_by_version "$VERSION")
|
VERSION_MANIFEST=$(echo "$RELEASE_MANIFEST" | filter_by_channel "$CHANNEL" | filter_by_arch "$ARCH" | filter_by_version "$VERSION")
|
||||||
|
@ -157,8 +157,8 @@ if [[ "$PRINT_ONLY" == true ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -x "$CACHE_PATH/bin/flutter" ]]; then
|
if [[ ! -x "$CACHE_PATH/bin/flutter" ]]; then
|
||||||
if [[ "$CHANNEL" == "master" ]]; then
|
if [[ "$CHANNEL" == "master" || "$CHANNEL" == "main" ]]; then
|
||||||
git clone -b master https://github.com/flutter/flutter.git "$CACHE_PATH"
|
git clone -b "$CHANNEL" https://github.com/flutter/flutter.git "$CACHE_PATH"
|
||||||
if [[ "$VERSION" != "any" ]]; then
|
if [[ "$VERSION" != "any" ]]; then
|
||||||
git config --global --add safe.directory "$CACHE_PATH"
|
git config --global --add safe.directory "$CACHE_PATH"
|
||||||
(cd "$CACHE_PATH" && git checkout "$VERSION")
|
(cd "$CACHE_PATH" && git checkout "$VERSION")
|
||||||
|
|
Loading…
Reference in a new issue