-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ Pods/ | |
Podfile.lock | ||
xcuserdata/ | ||
*.xcworkspace/ | ||
dd_tmp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,71 @@ | ||
#!/usr/bin/env bash | ||
|
||
function setup_ios_env() { | ||
if ! [ -x "$(command -v xcpretty)" ]; then | ||
gem install cocoapods | ||
fi | ||
local dir=$(dirname "$BASH_SOURCE") | ||
gem install cocoapods | ||
(cd "$dir" && pod install) | ||
} | ||
|
||
function install_xcpretty() { | ||
if ! [ -x "$(command -v xcpretty)" ]; then | ||
gem install xcpretty | ||
fi | ||
} | ||
|
||
function universal_framework() { | ||
local dir=$(dirname "$BASH_SOURCE") | ||
"$dir/universal_framework.sh" | ||
} | ||
|
||
function earl_grey_example() { | ||
local dir=$(dirname "$BASH_SOURCE") | ||
local buildDir="$dir/build" | ||
|
||
for arg in "$@"; do case "$arg" in | ||
|
||
'--generate' | '-g') | ||
"$dir/build_example.sh" | ||
;; | ||
|
||
'--copy' | '-c') | ||
echo "TODO" | ||
;; | ||
install_xcpretty | ||
|
||
esac done | ||
} | ||
rm -rf "$buildDir" | ||
|
||
function earl_grey_ftl() { | ||
local dir=$(dirname "$BASH_SOURCE") | ||
for arg in "$@"; do case "$arg" in | ||
xcodebuild build-for-testing \ | ||
-allowProvisioningUpdates \ | ||
-workspace "$dir/EarlGreyExample.xcworkspace" \ | ||
-scheme "EarlGreyExampleSwiftTests" \ | ||
-derivedDataPath "$buildDir" \ | ||
-sdk iphoneos | | ||
xcpretty | ||
|
||
'--generate' | '-g') | ||
"$dir/build_ftl.sh" | ||
xcodebuild build-for-testing \ | ||
-allowProvisioningUpdates \ | ||
-workspace "$dir/EarlGreyExample.xcworkspace" \ | ||
-scheme "EarlGreyExampleTests" \ | ||
-derivedDataPath "$buildDir" \ | ||
-sdk iphoneos | | ||
xcpretty | ||
;; | ||
|
||
'--copy' | '-c') | ||
echo "--copy TODO" | ||
|
||
local productsDir="$dir/build/Build/Products" | ||
|
||
cp -R "$productsDir/*-iphoneos" "$FLANK_FIXTURES_TMP/" | ||
|
||
cp "$productsDir/*.xctestrun" "$FLANK_FIXTURES_TMP/" | ||
|
||
cp \ | ||
"$productsDir/Debug-iphoneos/EarlGreyExampleTests.xctest/EarlGreyExampleTests" \ | ||
"$FLANK_FIXTURES_TMP/objc/" | ||
|
||
cp \ | ||
"$productsDir/Debug-iphoneos/EarlGreyExampleSwiftTests.xctest/EarlGreyExampleSwiftTests" \ | ||
"$FLANK_FIXTURES_TMP/swift/" | ||
;; | ||
|
||
esac done | ||
} | ||
|
||
function universal_framework() { | ||
local dir=$(dirname "$BASH_SOURCE") | ||
"$dir/universal_framework.sh" | ||
} | ||
|
||
echo "iOS test projects ops loaded" |