Skip to content

Commit

Permalink
Fixing build platforms sript
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Moya de Rivas committed Nov 2, 2020
1 parent edc6c5a commit a8fcbad
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions scripts/build_platforms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@ gem install xcpretty

SCHEMES=( SwiftUIPager_Catalyst SwiftUIPager_macOS SwiftUIPager_iOS SwiftUIPager_watchOS SwiftUIPager_tvOS )
PLATFORMS=( "platform=macOS,variant=Mac Catalyst" "platform=macOS" "generic/platform=iOS" "generic/platform=watchOS" "generic/platform=tvOS" )
DIR=$(xcodebuild -project SwiftUIPager.xcodeproj -showBuildSettings | grep -m 1 "BUILD_DIR" | grep -oEi "\/.*")
rm -rd $DIR

rm -rd $DIR
for i in ${!SCHEMES[@]}; do
xcodebuild clean build -scheme ${SCHEMES[$i]} \
-project SwiftUIPager.xcodeproj \
-destination "${PLATFORMS[$i]}" | xcpretty

COUNT=$(find $DIR -maxdepth 1 -type d | wc -l)
if [ $COUNT -eq 2 ]; then
echo "$(tput setaf 2)Build succeded for target ${SCHEMES[$i]}$(tput sgr0)"
else
echo "$(tput setaf 1)Build failed for target ${SCHEMES[$i]}$(tput sgr0)"
exit 1
fi
-destination "${PLATFORMS[$i]}" || exit 1
done

0 comments on commit a8fcbad

Please sign in to comment.