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
1
.github/workflows/workflow.yml
vendored
1
.github/workflows/workflow.yml
vendored
|
@ -6,7 +6,6 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_channel:
|
test_channel:
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
|
|
11
setup.sh
11
setup.sh
|
@ -78,11 +78,11 @@ transform_path() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
SDK_CACHE=""
|
CACHE_PATH=""
|
||||||
|
|
||||||
while getopts 'c:' flag; do
|
while getopts 'c:' flag; do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
c) SDK_CACHE="$(transform_path $OPTARG)" ;;
|
c) CACHE_PATH="$OPTARG" ;;
|
||||||
?) exit 2 ;;
|
?) exit 2 ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -90,11 +90,8 @@ done
|
||||||
CHANNEL="${@:$OPTIND:1}"
|
CHANNEL="${@:$OPTIND:1}"
|
||||||
VERSION="${@:$OPTIND+1:1}"
|
VERSION="${@:$OPTIND+1:1}"
|
||||||
|
|
||||||
if [[ $OS_NAME == windows ]]; then
|
SDK_CACHE="$(transform_path ${CACHE_PATH})"
|
||||||
PUB_CACHE="${USERPROFILE}\\.pub-cache"
|
PUB_CACHE="$(transform_path ${CACHE_PATH}/.pub-cache)"
|
||||||
else
|
|
||||||
PUB_CACHE="${HOME}/.pub-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
if [[ ! -x "${SDK_CACHE}/bin/flutter" ]]; then
|
||||||
if [[ $CHANNEL == master ]]; then
|
if [[ $CHANNEL == master ]]; then
|
||||||
|
|
Loading…
Reference in a new issue