mirror of
https://github.com/subosito/flutter-action.git
synced 2024-08-16 10:19:50 +02:00
update .pub-cache location
This commit is contained in:
parent
5e1529bc12
commit
f0cc0311e0
2 changed files with 5 additions and 9 deletions
3
.github/workflows/workflow.yml
vendored
3
.github/workflows/workflow.yml
vendored
|
@ -1,12 +1,11 @@
|
|||
name: Main workflow
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test_channel:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
|
|
11
setup.sh
11
setup.sh
|
@ -78,11 +78,11 @@ transform_path() {
|
|||
fi
|
||||
}
|
||||
|
||||
SDK_CACHE=""
|
||||
CACHE_PATH=""
|
||||
|
||||
while getopts 'c:' flag; do
|
||||
case "${flag}" in
|
||||
c) SDK_CACHE="$(transform_path $OPTARG)" ;;
|
||||
c) CACHE_PATH="$OPTARG" ;;
|
||||
?) exit 2 ;;
|
||||
esac
|
||||
done
|
||||
|
@ -90,11 +90,8 @@ done
|
|||
CHANNEL="${@:$OPTIND:1}"
|
||||
VERSION="${@:$OPTIND+1:1}"
|
||||
|
||||
if [[ $OS_NAME == windows ]]; then
|
||||
PUB_CACHE="${USERPROFILE}\\.pub-cache"
|
||||
else
|
||||
PUB_CACHE="${HOME}/.pub-cache"
|
||||
fi
|
||||
SDK_CACHE="$(transform_path ${CACHE_PATH})"
|
||||
PUB_CACHE="$(transform_path ${CACHE_PATH}/.pub-cache)"
|
||||
|
||||
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
||||
if [[ $CHANNEL == master ]]; then
|
||||
|
|
Loading…
Reference in a new issue