Skip to content

Commit

Permalink
Automated releases (#1219)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
flovilmart authored Dec 5, 2017
1 parent 9b8b8fe commit 0469af6
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ xcuserdata
## Dependency Managers
Pods/
Carthage/Build
docs/
./Bolts

## AppCode
.idea/
86 changes: 59 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,70 @@
branches:
only:
- master
language: objective-c
os: osx
osx_image: xcode8.3
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=macOS
- TEST_TYPE=Deployment
- TEST_TYPE=Carthage
- TEST_TYPE=CocoaPods
branches:
only:
- master
- /^v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?$/
git:
submodules: false

before_install:
- git submodule update --init --recursive
install:
- |
if [ -n "$TEST_TYPE" ]; then
bundle install
if [ "$TEST_TYPE" == "Carthage" ]; then
brew update
brew install carthage || brew upgrade carthage
fi
fi

stage: test
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=macOS
install: bundle install
script:
- |
RAKE_TASK_NAME=$(echo "$TEST_TYPE" | tr '[:upper:]' '[:lower:]')
bundle exec rake test:$RAKE_TASK_NAME
after_success:
- |
if [ "$TEST_TYPE" = iOS ] || [ "$TEST_TYPE" = macOS ]; then
bash <(curl -s https://codecov.io/bash)
fi
after_success: bash <(curl -s https://codecov.io/bash)

jobs:
include:
- stage: release
env: Deployment
install: bundle install
script:
- bundle exec rake test:deployment
- ./Scripts/jazzy.sh
deploy:
- provider: releases
api_key:
secure: $GITHUB_TOKEN # Set in travis-ci.org dashboard
file_glob: true
file: build/release/*
skip_cleanup: true
on:
tags: true
all_branches: true
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: docs/
on:
all_branches: true
- stage: release
env: Cocoapods
install: bundle install
script: bundle exec rake test:cocoapods
deploy:
provider: script
skip_cleanup: true
script: ./Scripts/publish.sh
on:
tags: true
all_branches: true
- stage: release
env: Carthage
install:
- bundle install
- brew update
- brew install carthage || brew upgrade carthage
script: bundle exec rake test:carthage
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ gem 'naturally', '~> 1.3.2'
gem 'xcpretty'
gem 'xcodeproj'
gem 'cocoapods'
gem 'jazzy', '~> 0.9.0'

28 changes: 27 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,49 @@ 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.3)
i18n (0.8.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.6)
liferaft (0.0.6)
minitest (5.10.1)
molinillo (0.5.6)
mustache (0.99.8)
nanaimo (0.2.3)
nap (1.1.0)
naturally (1.3.2)
netrc (0.7.8)
open4 (1.3.4)
plist (3.2.0)
rake (11.2.2)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redcarpet (3.4.0)
rouge (1.11.1)
ruby-macho (0.2.6)
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 @@ -76,11 +101,12 @@ PLATFORMS

DEPENDENCIES
cocoapods
jazzy (~> 0.9.0)
naturally (~> 1.3.2)
plist
rake
xcodeproj
xcpretty

BUNDLED WITH
1.12.5
1.16.0
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ Notice the API docs aren't totally up to date when it comes to latest Swift sign

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

## Preparing for a new release

### Update the version number

You can use the rake task in order to bump the version number, it's safe, and will properly update all version numbers
```
$ bundle exec rake package:set_version[X.X.X]
```
Replace X.X.X by the version number and push to the repository.
## Dependencies
We use the following libraries as dependencies inside of Parse:
Expand Down
20 changes: 20 additions & 0 deletions Scripts/jazzy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
mkdir -p ./Bolts # Create a temporary bolts folder
cp -R Carthage/Checkouts/Bolts-ObjC/Bolts/**/*.h ./Bolts # Copy bolts

ver=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" Parse/Resources/Parse-iOS.Info.plist`
jazzy \
--objc \
--clean \
--author "Parse Community" \
--author_url http://parseplatform.org \
--github_url https://github.com/parse-community/Parse-SDK-iOS-OSX \
--root-url http://parseplatform.org/Parse-SDK-iOS-OSX/api/ \
--module-version ${ver} \
--xcodebuild-arguments --objc,Parse/Parse.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path --sdk iphonesimulator),-I,$(pwd) \
--theme fullwidth \
--skip-undocumented \
--exclude=./Bolts/* \
--module Parse \
--output docs/api

rm -rf ./Bolts # cleanup temporary bolts
4 changes: 4 additions & 0 deletions Scripts/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 Parse.podspec

0 comments on commit 0469af6

Please sign in to comment.