From eb7929adbab3479b24bc5ef90e078227d84e3357 Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Tue, 12 Dec 2017 13:55:25 +0100 Subject: [PATCH 1/2] Add Travis config. --- .travis.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..091ad45 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +language: objective-c +osx_image: xcode9.1 +env: + global: + - FRAMEWORK_SCHEME="CountryPickerView" + - FRAMEWORK_PROJECT="CountryPickerView.xcodeproj" + - IOS_SDK=iphonesimulator11.1 + - DEMO_SCHEME="CountryPickerViewDemo" + - DEMO_WORKSPACE=CountryPickerViewDemo/CountryPickerViewDemo.xcworkspace + - PLATFORM="platform=iOS Simulator,OS=11.1,name=iPhone 8" + matrix: + - BUILD_TYPE=FRAMEWORK POD_LINT="TRUE" + - BUILD_TYPE=DEMO POD_LINT="FALSE" + +before_install: + - gem install cocoapods --no-rdoc --no-ri + - gem install xcpretty --no-rdoc --no-ri + +script: + - set -o pipefail + - xcodebuild -version + - xcodebuild -showsdks + - xcrun simctl list + + # Build the framework and Demo app + - if [ $BUILD_TYPE == "FRAMEWORK" ]; then + xcodebuild build -project "$FRAMEWORK_PROJECT" -scheme "$FRAMEWORK_SCHEME" -sdk "$IOS_SDK" -destination "$PLATFORM" | xcpretty; + elif [ $BUILD_TYPE == "DEMO" ]; then + pod install --project-directory=./CountryPickerViewDemo --repo-update; + xcodebuild build -workspace "$DEMO_WORKSPACE" -scheme "$DEMO_SCHEME" -sdk "$IOS_SDK" -destination "$PLATFORM" | xcpretty; + else + echo "Unknown BUILD_TYPE $BUILD_TYPE"; + fi + + # Lint the pod + - if [ $POD_LINT == "TRUE" ]; then + pod lib lint; + fi From 0af86a04a99dc1890c66e00d4dbd0d55080fa983 Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Wed, 13 Dec 2017 08:27:03 +0100 Subject: [PATCH 2/2] Add build status badge --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cbc977c..a7c8f0b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # CountryPickerView -[![Version](https://img.shields.io/cocoapods/v/CountryPickerView.svg?style=flat)](http://cocoapods.org/pods/CountryPickerView) +[![Build Status](https://travis-ci.org/kizitonwose/CountryPickerView.svg?branch=master)](https://travis-ci.org/kizitonwose/CountryPickerView) [![Platform](https://img.shields.io/badge/Platform-iOS-00BCD4.svg)](http://cocoapods.org/pods/CountryPickerView) -[![License](https://img.shields.io/badge/License-MIT-8D6E63.svg)](https://github.com/kizitonwose/CountryPickerView/blob/master/LICENSE.md) +[![Version](https://img.shields.io/cocoapods/v/CountryPickerView.svg?style=flat)](http://cocoapods.org/pods/CountryPickerView) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![License](https://img.shields.io/badge/License-MIT-8D6E63.svg)](https://github.com/kizitonwose/CountryPickerView/blob/master/LICENSE.md) CountryPickerView is a simple, customizable view for selecting countries in iOS apps.