@@ -12,10 +12,14 @@ install_homebrew ()
1212 if type brew > /dev/null
1313 then
1414 echo " ✔ brew is already installed"
15- echo " "
16- echo " → Updating homebrew formulas"
17- brew update > /dev/null || brew update > /dev/null
18- echo " ✔ formulas updated"
15+
16+ if [ -z " $SKIP_BREW_FORMULAS_UPDATE " ]
17+ then
18+ echo " "
19+ echo " → Updating homebrew formulas"
20+ brew update > /dev/null || brew update > /dev/null
21+ echo " ✔ formulas updated"
22+ fi
1923 else
2024 command -v ruby > /dev/null 2>&1 || { echo >&2 " Error: Some ruby of version is required to install homebrew. Aborting" ; exit 1; }
2125 ruby -e " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install) "
@@ -87,6 +91,7 @@ bundle_install ()
8791 " or try to install the gems globally by running the following command:"
8892 print_gem_install_cmd
8993 printf " \033[0m"
94+ exit 1
9095 fi
9196}
9297
@@ -111,7 +116,7 @@ bootstrap_carthage ()
111116 echo " "
112117 echo " → Bootstrapping Carthage"
113118 echo " "
114- carthage_cmd=" time carthage bootstrap --platform ios "
119+ carthage_cmd=" time carthage bootstrap --platform $CARTHAGE_BUILD_PLATFORM "
115120
116121 if [ " $USE_SSH " == " true" ]
117122 then
@@ -121,6 +126,12 @@ bootstrap_carthage ()
121126 then
122127 carthage_cmd=" $carthage_cmd --use-submodules --no-build"
123128 fi
129+
130+ if [ " $CARTHAGE_NO_USE_BINARIES " == " true" ]
131+ then
132+ carthage_cmd=" $carthage_cmd --no-use-binaries"
133+ fi
134+
124135 eval $carthage_cmd
125136}
126137
@@ -165,6 +176,21 @@ install_dependencies ()
165176 fi
166177}
167178
179+ install_carthage ()
180+ {
181+ source script/common/carthage
182+
183+ if type carthage > /dev/null
184+ then
185+ echo " "
186+ echo " → Checking installed version of carthage"
187+ echo " "
188+ check_carthage_version
189+ else
190+ force_install_carthage
191+ fi
192+ }
193+
168194main ()
169195{
170196 source script/.env
@@ -178,7 +204,7 @@ main ()
178204
179205 if [ -f Cartfile ]
180206 then
181- brew_install " carthage "
207+ install_carthage
182208 bootstrap_carthage
183209 fi
184210
0 commit comments