Skip to content

Commit 7d1e6fa

Browse files
committed
Update install.sh to support SETUP_FLUTTER_BRANCH
1 parent 211cb8e commit 7d1e6fa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ This action is designed to be used in GitHub Actions environment. If you want to
119119
#
120120
# Example:
121121
122-
SETUP_FLUTTER_BRANCH=main
122+
export SETUP_FLUTTER_BRANCH=main
123123
curl -fsSL https://raw.githubusercontent.com/flutter-actions/setup-flutter/${SETUP_FLUTTER_BRANCH}/install.sh | bash -s -- 3.0.2 stable
124124
```
125125

install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
SETUP_FLUTTER_BRANCH=${SETUP_FLUTTER_BRANCH:-"main"}
23
SETUP_FLUTTER_WORKDIR=${SETUP_FLUTTER_WORKDIR:-"$(pwd)/.setup-flutter"}
34

45
# Runner environment variables
@@ -20,4 +21,4 @@ mkdir -p "$RUNNER_TOOL_CACHE" "$RUNNER_TEMP"
2021
touch "$GITHUB_ENV" "$GITHUB_PATH"
2122

2223
# Run the action
23-
curl -fsSL "https://raw.githubusercontent.com/flutter-actions/setup-flutter/main/action.sh" | bash -s -- "$@"
24+
curl -fsSL "https://raw.githubusercontent.com/flutter-actions/setup-flutter/${SETUP_FLUTTER_BRANCH}/action.sh" | bash -s -- "$@"

0 commit comments

Comments
 (0)