Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit b4c2a17

Browse files
authored
Adds jazzy docs generation, docs and package releases (#137)
* Adds jazzy docs generation and gh-pages releases * Skip after success * use jobs * nits * Adds Cocoapods autopublish * Better jazzy config * Fixes warning appearing in 8.3.3 * Makes pod repo update silent * Update .travis.yml
1 parent 8d7d704 commit b4c2a17

File tree

7 files changed

+103
-41
lines changed

7 files changed

+103
-41
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Temporary Items
3636
## Build generated
3737
build/
3838
DerivedData
39+
docs/
3940

4041
## Various settings
4142
*.pbxuser

.jazzy.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module: "ParseLiveQuery"
2+
xcodebuild_arguments: ["-scheme","ParseLiveQuery-iOS"]
3+
theme: "fullwidth"
4+
skip_undocumented: true
5+
clean: true
6+
author_url: "http://parseplatform.org"
7+
github_url: "https://github.com/parse-community/ParseLiveQuery-iOS-OSX"
8+
root_url: "http://parseplatform.org/ParseLiveQuery-iOS-OSX/"
9+
author: "Parse Community"

.travis.yml

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,67 @@
11
branches:
22
only:
33
- master
4+
- /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/
45
language: objective-c
56
os: osx
6-
osx_image: xcode8
7+
osx_image: xcode8.3
78
cache:
89
- cocoapods
9-
env:
10-
matrix:
11-
- TEST_TYPE=iOS
12-
- TEST_TYPE=OSX
13-
- TEST_TYPE=OSXDemoSwift
14-
- TEST_TYPE=OSXDemoObjC
15-
- TEST_TYPE=CocoaPods
16-
- TEST_TYPE=Carthage
17-
install:
18-
- |
19-
bundle install
20-
script:
21-
- |
22-
if [ "$TEST_TYPE" = iOS ]; then
23-
set -o pipefail
24-
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
25-
elif [ "$TEST_TYPE" = OSX ]; then
26-
set -o pipefail
27-
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
28-
elif [ "$TEST_TYPE" = OSXDemoSwift ]; then
29-
set -o pipefail
30-
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c
31-
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c
32-
elif [ "$TEST_TYPE" = OSXDemoObjC ]; then
33-
set -o pipefail
34-
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c
35-
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c
36-
elif [ "$TEST_TYPE" = CocoaPods ]; then
37-
bundle exec pod repo update 2>&1 > /dev/null || exit 1
38-
pod lib lint ParseLiveQuery.podspec
39-
elif [ "$TEST_TYPE" = Carthage ]; then
40-
carthage build --no-skip-current
41-
fi
42-
after_success:
43-
- |
44-
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = OSX ]; then
45-
bash <(curl -s https://codecov.io/bash)
46-
fi
10+
11+
install: bundle install
12+
13+
jobs:
14+
include:
15+
- stage: test
16+
env: iOS
17+
script:
18+
- |
19+
set -o pipefail
20+
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
21+
after_success: bash <(curl -s https://codecov.io/bash)
22+
- stage: test
23+
env: OSX
24+
script:
25+
- |
26+
set -o pipefail
27+
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
28+
after_success: bash <(curl -s https://codecov.io/bash)
29+
- stage: demo
30+
env: OSX-Swift
31+
script:
32+
- |
33+
set -o pipefail
34+
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo | xcpretty -c
35+
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo -configuration Debug | xcpretty -c
36+
- stage: demo
37+
env: OSX-ObjC
38+
script:
39+
- |
40+
set -o pipefail
41+
xcodebuild clean -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC | xcpretty -c
42+
xcodebuild build -workspace ParseLiveQuery.xcworkspace -scheme LiveQueryDemo-ObjC -configuration Debug | xcpretty -c
43+
- stage: distribution
44+
env: Carthage
45+
script: carthage build --no-skip-current
46+
- stage: distribution
47+
env: CocoaPods
48+
script:
49+
- bundle exec pod repo update --silent
50+
- pod lib lint ParseLiveQuery.podspec
51+
deploy:
52+
provider: script
53+
skip_cleanup: true
54+
script: ./publish.sh
55+
on:
56+
tags: true
57+
all_branches: true
58+
- stage: distribution
59+
env: Docs
60+
script: bundle exec jazzy
61+
deploy:
62+
provider: pages
63+
skip_cleanup: true
64+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
65+
local_dir: docs/
66+
on:
67+
all_branches: true

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ source 'https://rubygems.org'
33
gem 'xcpretty'
44
# xcode8 compat
55
gem 'cocoapods', '1.1.1'
6+
gem 'jazzy'

Gemfile.lock

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,45 @@ GEM
4343
cocoapods-try (1.1.0)
4444
colored (1.2)
4545
escape (0.0.4)
46+
ffi (1.9.18)
4647
fourflusher (2.0.1)
4748
fuzzy_match (2.0.4)
4849
gh_inspector (1.0.2)
4950
i18n (0.7.0)
51+
jazzy (0.9.0)
52+
cocoapods (~> 1.0)
53+
mustache (~> 0.99)
54+
open4
55+
redcarpet (~> 3.2)
56+
rouge (~> 1.5)
57+
sass (~> 3.4)
58+
sqlite3 (~> 1.3)
59+
xcinvoke (~> 0.3.0)
5060
json (1.8.3)
61+
liferaft (0.0.6)
5162
minitest (5.9.0)
5263
molinillo (0.5.5)
64+
mustache (0.99.8)
5365
nanaimo (0.2.3)
5466
nap (1.1.0)
5567
netrc (0.7.8)
68+
open4 (1.3.4)
69+
rb-fsevent (0.10.2)
70+
rb-inotify (0.9.10)
71+
ffi (>= 0.5.0, < 2)
72+
redcarpet (3.4.0)
5673
rouge (1.11.1)
74+
sass (3.5.3)
75+
sass-listen (~> 4.0.0)
76+
sass-listen (4.0.0)
77+
rb-fsevent (~> 0.9, >= 0.9.4)
78+
rb-inotify (~> 0.9, >= 0.9.7)
79+
sqlite3 (1.3.13)
5780
thread_safe (0.3.5)
5881
tzinfo (1.2.2)
5982
thread_safe (~> 0.1)
83+
xcinvoke (0.3.0)
84+
liferaft (~> 0.0.6)
6085
xcodeproj (1.4.2)
6186
CFPropertyList (~> 2.3.3)
6287
activesupport (>= 3)
@@ -71,7 +96,8 @@ PLATFORMS
7196

7297
DEPENDENCIES
7398
cocoapods (= 1.1.1)
99+
jazzy
74100
xcpretty
75101

76102
BUNDLED WITH
77-
1.13.1
103+
1.16.0

Sources/ParseLiveQuery/Internal/BoltsHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func objcTask<T>(_ task: Task<T>) -> BFTask<T> where T: AnyObject {
1818
if task.cancelled {
1919
taskCompletionSource.trySetCancelled()
2020
} else if task.faulted {
21-
let error = task.error as? NSError ?? NSError(domain: unknownDomain, code: -1, userInfo: nil)
21+
let error = (task.error as NSError?) ?? NSError(domain: unknownDomain, code: -1, userInfo: nil)
2222
taskCompletionSource.trySetError(error)
2323
} else {
2424
taskCompletionSource.trySetResult(task.result)

publish.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh -e
2+
gem install bundler
3+
bundle install
4+
bundle exec pod trunk push ParseLiveQuery.podspec

0 commit comments

Comments
 (0)