Browse Source

Merge pull request #217 from bizz84/feature/add-xcpretty

Feature/add xcpretty
Andrea Bizzotto 8 years ago
parent
commit
08a0259af1
4 changed files with 31 additions and 8 deletions
  1. 1 0
      .gitignore
  2. 4 2
      .travis.yml
  3. 3 2
      CHANGELOG.md
  4. 23 4
      scripts/build.sh

+ 1 - 0
.gitignore

@@ -16,6 +16,7 @@ profile
 *.moved-aside
 *.moved-aside
 DerivedData
 DerivedData
 .idea/
 .idea/
+xcodebuild.log
 # Pods - for those of you who use CocoaPods
 # Pods - for those of you who use CocoaPods
 Pods
 Pods
 # emacs
 # emacs

+ 4 - 2
.travis.yml

@@ -1,7 +1,9 @@
 language: objective-c
 language: objective-c
 osx_image: xcode8.3
 osx_image: xcode8.3
-#before_install:
-#  - rvm get stable
+
+before_install:
+  - gem install xcpretty
+# - rvm get stable
 
 
 install:
 install:
   - ./scripts/install_swiftlint.sh
   - ./scripts/install_swiftlint.sh

+ 3 - 2
CHANGELOG.md

@@ -2,9 +2,10 @@
 
 
 All notable changes to this project will be documented in this file.
 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
 ## [0.10.0](https://github.com/bizz84/SwiftyStoreKit/releases/tag/0.10.0) `verifyReceipt` now automatically refreshes the receipt if needed
 
 

+ 23 - 4
scripts/build.sh

@@ -1,7 +1,26 @@
 #!/bin/bash
 #!/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