Last active
August 1, 2018 11:46
-
-
Save fromkk/95b7fd046a081da5bfac913e1c7b31a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
xcodeproj=./Type.xcodeproj | |
xcworkspace=./Type.xcworkspace | |
isWorkspace=true | |
test="-only-testing:TypeUITests" | |
scheme="Type" | |
configuration="Debug" | |
sdk="iphonesimulator" | |
devices=("iPhone SE" "iPhone 7" "iPhone 7 Plus" "iPhone X") | |
osList=("10.3.1" "11.4") | |
if $isWorkspace ; then | |
command="xcodebuild -workspace $xcworkspace" | |
else | |
command="xcodebuild -project $xcodeproj" | |
fi | |
rm -rf ./result | |
xcrun simctl shutdown | |
xcrun simctl erase all | |
open -a Simulator.app | |
command="$command -scheme $scheme -sdk $sdk -configuration $configuration" | |
$command clean | |
$command build-for-testing | |
for ((i = 0; i < ${#devices[@]}; i++)); do | |
device=${devices[$i]} | |
for os in ${osList[@]}; do | |
destination="platform=iOS Simulator,name=${device},OS=${os}" | |
result=./result/"${device}"_"${os}".bundle | |
echo $result | |
$command test-without-building -destination "$destination" $test -resultBundlePath "$result" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment