File tree Expand file tree Collapse file tree 2 files changed +16
-15
lines changed
Expand file tree Collapse file tree 2 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 1010 integration-test-macos :
1111 macos :
1212 xcode : 14.2.0
13+ resource_class : macos.m1.large.gen1
1314 steps :
1415 - checkout
1516 - flutter/install_sdk_and_pub :
Original file line number Diff line number Diff line change 22
33INSTALL_LOCATION=$( eval " echo $ORB_EVAL_INSTALL_LOCATION " )
44
5- if [ ! -d " $INSTALL_LOCATION /flutter " ] ; then
6- mkdir -p " $INSTALL_LOCATION "
7- if [ " $( uname ) " == ' Darwin ' ] ; then
8- curl -o flutter_sdk.zip https://storage.googleapis.com/flutter_infra_release/releases/stable/ macos/flutter_macos_ $ORB_VAL_FLUTTER_SDK_VERSION -stable.zip
9- unzip -qq flutter_sdk.zip -d " $INSTALL_LOCATION "
10- rm flutter_sdk. zip
11- elif uname -a | grep -q " Linux " ; then
12- curl -o flutter_sdk.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_ $ORB_VAL_FLUTTER_SDK_VERSION -stable.tar.xz
13- tar xf flutter_sdk.tar.xz -C " $INSTALL_LOCATION "
14- rm -f flutter_sdk.tar.xz
15- else
16- echo " This platform ( $( uname -a ) ) is not supported. "
17- exit 1
18- fi
19- fi
5+ function install_flutter() {
6+ local machine= ${1 :- " Linux " }
7+ local arch= ${2 :- " amd64 " }
8+ [[ $machine == " Darwin " ]] && uname= macos || uname=linux
9+ [[ $arch == " arm64 " ]] && version= " flutter_ ${uname} _arm64 " || version= " flutter_ ${uname} "
10+ [[ $uname == " linux " ]] && suffix= " tar.xz " || suffix= " zip"
11+
12+ baseurl= " https://storage.googleapis.com/flutter_infra_release/releases/stable"
13+
14+ fullurl= " $baseurl / $uname / ${version} _ $ORB_VAL_FLUTTER_SK_VERSION -stable. ${suffix} "
15+
16+ curl -o " flutter_sdk. ${suffix} " " $fullurl "
17+ }
18+
19+ install_flutter " $( uname ) " " $( uname -a ) "
2020
2121echo " export PATH=$INSTALL_LOCATION /flutter/bin:\$ PATH" >> " $BASH_ENV "
2222
You can’t perform that action at this time.
0 commit comments