Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Temporary Items
## Build generated
build/
DerivedData
docs/

## Various settings
*.pbxuser
Expand Down
9 changes: 9 additions & 0 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module: "ParseLiveQuery"
xcodebuild_arguments: ["-scheme","ParseLiveQuery-iOS"]
theme: "fullwidth"
skip_undocumented: true
clean: true
author_url: "http://parseplatform.org"
github_url: "https://github.com/parse-community/ParseLiveQuery-iOS-OSX"
root_url: "http://parseplatform.org/ParseLiveQuery-iOS-OSX/"
author: "Parse Community"
99 changes: 60 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,67 @@
branches:
only:
- master
- /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/
language: objective-c
os: osx
osx_image: xcode8
osx_image: xcode8.3
cache:
- cocoapods
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=OSX
- TEST_TYPE=OSXDemoSwift
- TEST_TYPE=OSXDemoObjC
- TEST_TYPE=CocoaPods
- TEST_TYPE=Carthage
install:
- |
bundle install
script:
- |
if [ "$TEST_TYPE" = iOS ]; then
set -o pipefail
xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 4s" -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
elif [ "$TEST_TYPE" = OSX ]; then
set -o pipefail
xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk macosx -scheme ParseLiveQuery-OSX -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
elif [ "$TEST_TYPE" = OSXDemoSwift ]; then
set -o pipefail
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c
elif [ "$TEST_TYPE" = OSXDemoObjC ]; then
set -o pipefail
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c
elif [ "$TEST_TYPE" = CocoaPods ]; then
bundle exec pod repo update 2>&1 > /dev/null || exit 1
pod lib lint ParseLiveQuery.podspec
elif [ "$TEST_TYPE" = Carthage ]; then
carthage build --no-skip-current
fi
after_success:
- |
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ]; then
bash <(curl -s https://codecov.io/bash)
fi

install: bundle install

jobs:
include:
- stage: test
env: iOS
script:
- |
set -o pipefail
xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk iphonesimulator -scheme ParseLiveQuery-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 4s" -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
after_success: bash <(curl -s https://codecov.io/bash)
- stage: test
env: OSX
script:
- |
set -o pipefail
xcodebuild build -workspace ParseLiveQuery.xcworkspace -sdk macosx -scheme ParseLiveQuery-OSX -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
after_success: bash <(curl -s https://codecov.io/bash)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an identical after_success call above, but in a separate test stage for a separate environment. Is there a way to consolidate these two declarations of stage test with different scripts depending on the environment, but the same after_success result?

- stage: demo
env: OSX-Swift
script:
- |
set -o pipefail
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c
- stage: demo
env: OSX-ObjC
script:
- |
set -o pipefail
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c
- stage: distribution
env: Carthage
script: carthage build --no-skip-current
- stage: distribution
env: CocoaPods
script:
- bundle exec pod repo update --silent
- pod lib lint ParseLiveQuery.podspec
deploy:
provider: script
skip_cleanup: true
script: ./publish.sh
on:
tags: true
all_branches: true
- stage: distribution
env: Docs
script: bundle exec jazzy
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: docs/
on:
all_branches: true
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ source 'https://rubygems.org'
gem 'xcpretty'
# xcode8 compat
gem 'cocoapods', '1.1.1'
gem 'jazzy'
28 changes: 27 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,45 @@ GEM
cocoapods-try (1.1.0)
colored (1.2)
escape (0.0.4)
ffi (1.9.18)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.2)
i18n (0.7.0)
jazzy (0.9.0)
cocoapods (~> 1.0)
mustache (~> 0.99)
open4
redcarpet (~> 3.2)
rouge (~> 1.5)
sass (~> 3.4)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (1.8.3)
liferaft (0.0.6)
minitest (5.9.0)
molinillo (0.5.5)
mustache (0.99.8)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.7.8)
open4 (1.3.4)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redcarpet (3.4.0)
rouge (1.11.1)
sass (3.5.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sqlite3 (1.3.13)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.4.2)
CFPropertyList (~> 2.3.3)
activesupport (>= 3)
Expand All @@ -71,7 +96,8 @@ PLATFORMS

DEPENDENCIES
cocoapods (= 1.1.1)
jazzy
xcpretty

BUNDLED WITH
1.13.1
1.16.0
2 changes: 1 addition & 1 deletion Sources/ParseLiveQuery/Internal/BoltsHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func objcTask<T>(_ task: Task<T>) -> BFTask<T> where T: AnyObject {
if task.cancelled {
taskCompletionSource.trySetCancelled()
} else if task.faulted {
let error = task.error as? NSError ?? NSError(domain: unknownDomain, code: -1, userInfo: nil)
let error = (task.error as NSError?) ?? NSError(domain: unknownDomain, code: -1, userInfo: nil)
taskCompletionSource.trySetError(error)
} else {
taskCompletionSource.trySetResult(task.result)
Expand Down
4 changes: 4 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -e
gem install bundler
bundle install
bundle exec pod trunk push ParseLiveQuery.podspec