Skip to content

Commit 0469af6

Browse files
authored
Automated releases (#1219)
* wip * wip * Proper docs generation * Build stages in travis * fixup! Build stages in travis * fixup! fixup! Build stages in travis * fixup! fixup! fixup! Build stages in travis * Upload releases automatically to github * Remove other stages * restores all tasks * Note about the version bump rake task * Adds cocoapods deployment * Dummy podspec * skip cleanup * nit * diable * use publish script * Makes it exectutable * Skip validation for now * nit * gem install bundler in publish * proper publish * remove dummy file * Restores cocoapods validation script * Adds docs gen and publishing * ouput to proper directory * Proper doc generations * Changes author to Parse Community * Update .travis.yml
1 parent 9b8b8fe commit 0469af6

File tree

7 files changed

+126
-28
lines changed

7 files changed

+126
-28
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ xcuserdata
2929
## Dependency Managers
3030
Pods/
3131
Carthage/Build
32+
docs/
33+
./Bolts
3234

3335
## AppCode
3436
.idea/

.travis.yml

+59-27
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,70 @@
1-
branches:
2-
only:
3-
- master
41
language: objective-c
52
os: osx
63
osx_image: xcode8.3
7-
env:
8-
global:
9-
- LC_CTYPE=en_US.UTF-8
10-
- LANG=en_US.UTF-8
11-
matrix:
12-
- TEST_TYPE=iOS
13-
- TEST_TYPE=macOS
14-
- TEST_TYPE=Deployment
15-
- TEST_TYPE=Carthage
16-
- TEST_TYPE=CocoaPods
4+
branches:
5+
only:
6+
- master
7+
- /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/
178
git:
189
submodules: false
10+
1911
before_install:
2012
- git submodule update --init --recursive
21-
install:
22-
- |
23-
if [ -n "$TEST_TYPE" ]; then
24-
bundle install
25-
if [ "$TEST_TYPE" == "Carthage" ]; then
26-
brew update
27-
brew install carthage || brew upgrade carthage
28-
fi
29-
fi
13+
14+
stage: test
15+
env:
16+
global:
17+
- LC_CTYPE=en_US.UTF-8
18+
- LANG=en_US.UTF-8
19+
matrix:
20+
- TEST_TYPE=iOS
21+
- TEST_TYPE=macOS
22+
install: bundle install
3023
script:
3124
- |
3225
RAKE_TASK_NAME=$(echo "$TEST_TYPE" | tr '[:upper:]' '[:lower:]')
3326
bundle exec rake test:$RAKE_TASK_NAME
34-
after_success:
35-
- |
36-
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = macOS ]; then
37-
bash <(curl -s https://codecov.io/bash)
38-
fi
27+
after_success: bash <(curl -s https://codecov.io/bash)
28+
29+
jobs:
30+
include:
31+
- stage: release
32+
env: Deployment
33+
install: bundle install
34+
script:
35+
- bundle exec rake test:deployment
36+
- ./Scripts/jazzy.sh
37+
deploy:
38+
- provider: releases
39+
api_key:
40+
secure: $GITHUB_TOKEN # Set in travis-ci.org dashboard
41+
file_glob: true
42+
file: build/release/*
43+
skip_cleanup: true
44+
on:
45+
tags: true
46+
all_branches: true
47+
- provider: pages
48+
skip_cleanup: true
49+
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
50+
local_dir: docs/
51+
on:
52+
all_branches: true
53+
- stage: release
54+
env: Cocoapods
55+
install: bundle install
56+
script: bundle exec rake test:cocoapods
57+
deploy:
58+
provider: script
59+
skip_cleanup: true
60+
script: ./Scripts/publish.sh
61+
on:
62+
tags: true
63+
all_branches: true
64+
- stage: release
65+
env: Carthage
66+
install:
67+
- bundle install
68+
- brew update
69+
- brew install carthage || brew upgrade carthage
70+
script: bundle exec rake test:carthage

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ gem 'naturally', '~> 1.3.2'
66
gem 'xcpretty'
77
gem 'xcodeproj'
88
gem 'cocoapods'
9+
gem 'jazzy', '~> 0.9.0'
10+

Gemfile.lock

+27-1
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,49 @@ GEM
4444
cocoapods-try (1.1.0)
4545
colored (1.2)
4646
escape (0.0.4)
47+
ffi (1.9.18)
4748
fourflusher (2.0.1)
4849
fuzzy_match (2.0.4)
4950
gh_inspector (1.0.3)
5051
i18n (0.8.0)
52+
jazzy (0.9.0)
53+
cocoapods (~> 1.0)
54+
mustache (~> 0.99)
55+
open4
56+
redcarpet (~> 3.2)
57+
rouge (~> 1.5)
58+
sass (~> 3.4)
59+
sqlite3 (~> 1.3)
60+
xcinvoke (~> 0.3.0)
5161
json (1.8.6)
62+
liferaft (0.0.6)
5263
minitest (5.10.1)
5364
molinillo (0.5.6)
65+
mustache (0.99.8)
5466
nanaimo (0.2.3)
5567
nap (1.1.0)
5668
naturally (1.3.2)
5769
netrc (0.7.8)
70+
open4 (1.3.4)
5871
plist (3.2.0)
5972
rake (11.2.2)
73+
rb-fsevent (0.10.2)
74+
rb-inotify (0.9.10)
75+
ffi (>= 0.5.0, < 2)
76+
redcarpet (3.4.0)
6077
rouge (1.11.1)
6178
ruby-macho (0.2.6)
79+
sass (3.5.3)
80+
sass-listen (~> 4.0.0)
81+
sass-listen (4.0.0)
82+
rb-fsevent (~> 0.9, >= 0.9.4)
83+
rb-inotify (~> 0.9, >= 0.9.7)
84+
sqlite3 (1.3.13)
6285
thread_safe (0.3.5)
6386
tzinfo (1.2.2)
6487
thread_safe (~> 0.1)
88+
xcinvoke (0.3.0)
89+
liferaft (~> 0.0.6)
6590
xcodeproj (1.4.2)
6691
CFPropertyList (~> 2.3.3)
6792
activesupport (>= 3)
@@ -76,11 +101,12 @@ PLATFORMS
76101

77102
DEPENDENCIES
78103
cocoapods
104+
jazzy (~> 0.9.0)
79105
naturally (~> 1.3.2)
80106
plist
81107
rake
82108
xcodeproj
83109
xcpretty
84110

85111
BUNDLED WITH
86-
1.12.5
112+
1.16.0

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ Notice the API docs aren't totally up to date when it comes to latest Swift sign
6868

6969
We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines][contributing].
7070

71+
## Preparing for a new release
72+
73+
### Update the version number
74+
75+
You can use the rake task in order to bump the version number, it's safe, and will properly update all version numbers
76+
77+
```
78+
$ bundle exec rake package:set_version[X.X.X]
79+
```
80+
81+
Replace X.X.X by the version number and push to the repository.
82+
7183
## Dependencies
7284

7385
We use the following libraries as dependencies inside of Parse:

Scripts/jazzy.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
mkdir -p ./Bolts # Create a temporary bolts folder
2+
cp -R Carthage/Checkouts/Bolts-ObjC/Bolts/**/*.h ./Bolts # Copy bolts
3+
4+
ver=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Parse/Resources/Parse-iOS.Info.plist`
5+
jazzy \
6+
--objc \
7+
--clean \
8+
--author "Parse Community" \
9+
--author_url http://parseplatform.org \
10+
--github_url https://github.com/parse-community/Parse-SDK-iOS-OSX \
11+
--root-url http://parseplatform.org/Parse-SDK-iOS-OSX/api/ \
12+
--module-version ${ver} \
13+
--xcodebuild-arguments --objc,Parse/Parse.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path --sdk iphonesimulator),-I,$(pwd) \
14+
--theme fullwidth \
15+
--skip-undocumented \
16+
--exclude=./Bolts/* \
17+
--module Parse \
18+
--output docs/api
19+
20+
rm -rf ./Bolts # cleanup temporary bolts

Scripts/publish.sh

+4
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 Parse.podspec

0 commit comments

Comments
 (0)