diff --git a/.gitignore b/.gitignore index 2e0f9f1a..6c3c44b5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ profile *.moved-aside DerivedData .idea/ +xcodebuild.log # Pods - for those of you who use CocoaPods Pods # emacs diff --git a/.travis.yml b/.travis.yml index 4ee4be34..c1b29b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ language: objective-c osx_image: xcode8.3 -#before_install: -# - rvm get stable + +before_install: + - gem install xcpretty +# - rvm get stable install: - ./scripts/install_swiftlint.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index d91ba483..83d16d88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ All notable changes to this project will be documented in this file. -## [WIP] 0.10.1 Danger integration +## [WIP] 0.10.1 Danger, xcpretty integration -* Adds Danger for better Pull Request etiquette +* Adds Danger for better Pull Request etiquette ([#215](https://github.com/bizz84/SwiftyStoreKit/pull/215)). +* Adds xcpretty to improve build logs ([#217](https://github.com/bizz84/SwiftyStoreKit/pull/217)) ## [0.10.0](https://github.com/bizz84/SwiftyStoreKit/releases/tag/0.10.0) `verifyReceipt` now automatically refreshes the receipt if needed diff --git a/scripts/build.sh b/scripts/build.sh index 8f93a4a9..c100fcd3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,7 +1,26 @@ #!/bin/bash +bold=$(tput bold) +normal=$(tput sgr0) -xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_iOS -xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_macOS -xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_tvOS +echo "${bold}/*****************************/" +echo "/* Build: SwiftyStoreKit_iOS */" +echo "/*****************************/${normal}" +set -o pipefail && xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_iOS | tee xcodebuild.log | xcpretty -xcodebuild test -project SwiftyStoreKit.xcodeproj -scheme SwiftyStoreKitTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.3' +echo "" +echo "${bold}/*******************************/" +echo "/* Build: SwiftyStoreKit_macOS */" +echo "/*******************************/${normal}" +set -o pipefail && xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_macOS | tee xcodebuild.log | xcpretty + +echo "" +echo "${bold}/******************************/" +echo "/* Build: SwiftyStoreKit_tvOS */" +echo "/******************************/${normal}" +set -o pipefail && xcodebuild -project SwiftyStoreKit.xcodeproj -target SwiftyStoreKit_tvOS | tee xcodebuild.log | xcpretty + +echo "" +echo "${bold}/****************************/" +echo "/* Run: SwiftyStoreKitTests */" +echo "/****************************/${normal}" +set -o pipefail && xcodebuild test -project SwiftyStoreKit.xcodeproj -scheme SwiftyStoreKitTests -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.3' | tee xcodebuild.log | xcpretty