Skip to content

Commit

Permalink
Update install.sh to support SETUP_FLUTTER_BRANCH
Browse files Browse the repository at this point in the history
  • Loading branch information
socheatsok78 committed Apr 27, 2024
1 parent 211cb8e commit 7d1e6fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ This action is designed to be used in GitHub Actions environment. If you want to
#
# Example:
SETUP_FLUTTER_BRANCH=main
export SETUP_FLUTTER_BRANCH=main
curl -fsSL https://raw.githubusercontent.com/flutter-actions/setup-flutter/${SETUP_FLUTTER_BRANCH}/install.sh | bash -s -- 3.0.2 stable
```

Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
SETUP_FLUTTER_BRANCH=${SETUP_FLUTTER_BRANCH:-"main"}
SETUP_FLUTTER_WORKDIR=${SETUP_FLUTTER_WORKDIR:-"$(pwd)/.setup-flutter"}

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

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

0 comments on commit 7d1e6fa

Please sign in to comment.