Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add example mode
  • Loading branch information
maicki committed Feb 10, 2017
commit f21e94bf5d5dd813eadcb29c5b555780f8da3321
45 changes: 45 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,51 @@ if [ "$MODE" = "examples-extra" ]; then
exit 0
fi

if [ "$MODE" = "example" ]; then
echo "Verifying that all AsyncDisplayKit examples compile."
#Update cocoapods repo
pod repo update master

example="examples/$2"
echo "Building (examples) $example."

if [ -f "${example}/Podfile" ]; then
echo "Using CocoaPods"
if [ -f "${example}/Podfile.lock" ]; then
rm "$example/Podfile.lock"
fi
rm -rf "$example/Pods"
pod install --project-directory=$example

set -o pipefail && xcodebuild \
-workspace "${example}/Sample.xcworkspace" \
-scheme Sample \
-sdk "$SDK" \
-destination "$PLATFORM" \
-derivedDataPath "$DERIVED_DATA_PATH" \
build | xcpretty $FORMATTER
elif [ -f "${example}/Cartfile" ]; then
echo "Using Carthage"
local_repo=`pwd`
current_branch=`git rev-parse --abbrev-ref HEAD`
cd $example

echo "git \"file://${local_repo}\" \"${current_branch}\"" > "Cartfile"
carthage update --platform iOS

set -o pipefail && xcodebuild \
-project "Sample.xcodeproj" \
-scheme Sample \
-sdk "$SDK" \
-destination "$PLATFORM" \
build | xcpretty $FORMATTER

cd ../..
fi
trap - EXIT
exit 0
fi

if [ "$MODE" = "life-without-cocoapods" ]; then
echo "Verifying that AsyncDisplayKit functions as a static library."

Expand Down