Skip to content

Commit

Permalink
Merge pull request ResearchKit#10 from syoung-smallwisdom/travis-doc-gen
Browse files Browse the repository at this point in the history
Update travis fastlane configuration to build docs and bump framework version
  • Loading branch information
Erin-Mounts committed May 1, 2018
2 parents 37aeda2 + 0d28aae commit d2e7cca
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 27 deletions.
98 changes: 89 additions & 9 deletions Gemfile.lock
Expand Up @@ -2,37 +2,79 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.2)
babosa (1.0.2)
claide (1.0.2)
cocoapods (1.5.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.5.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.5)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.7, < 2.0)
cocoapods-core (1.5.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.3.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
concurrent-ruby (1.0.5)
declarative (0.0.10)
declarative-option (0.1.0)
domain_name (0.5.20170404)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.2.1)
dotenv (2.4.0)
emoji_regex (0.1.1)
escape (0.0.4)
excon (0.62.0)
faraday (0.14.0)
faraday (0.15.0)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.1)
fastlane (2.88.0)
fastlane (2.93.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 2.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (~> 0.1)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
Expand All @@ -50,7 +92,7 @@ GEM
public_suffix (~> 2.0.0)
rubyzip (>= 1.1.0, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 1.6.2, < 2.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
Expand All @@ -60,6 +102,9 @@ GEM
xcodeproj (>= 1.5.7, < 2.0.0)
xcpretty (>= 0.2.4, < 1.0.0)
xcpretty-travis-formatter (>= 0.0.3)
ffi (1.9.23)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-api-client (0.13.6)
addressable (~> 2.5, >= 2.5.1)
Expand All @@ -80,8 +125,20 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jazzy (0.9.2)
cocoapods (~> 1.0)
mustache (~> 0.99)
open4
redcarpet (~> 3.2)
rouge (>= 2.0.6, < 4.0)
sass (~> 3.4)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.1.0)
jwt (2.1.0)
liferaft (0.0.6)
little-plugger (1.1.4)
logging (2.2.2)
little-plugger (~> 1.1)
Expand All @@ -91,44 +148,66 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_magick (4.5.1)
minitest (5.11.3)
molinillo (0.6.5)
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.4)
mustache (0.99.8)
nanaimo (0.2.5)
nap (1.1.0)
naturally (2.1.0)
netrc (0.11.0)
open4 (1.3.4)
os (0.9.6)
plist (3.4.0)
public_suffix (2.0.5)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redcarpet (3.4.0)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
retriable (3.1.1)
rouge (2.0.7)
ruby-macho (1.1.0)
rubyzip (1.2.1)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
security (0.1.3)
signet (0.8.1)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.2)
simctl (1.6.4)
CFPropertyList
naturally
slack-notifier (2.3.2)
sqlite3 (1.3.13)
terminal-notifier (1.8.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.5.0)
tty-screen (0.6.4)
tty-spinner (0.8.0)
tty-cursor (>= 0.5.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.3.0)
unicode-display_width (1.3.2)
word_wrap (1.0.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.5.7)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
Expand All @@ -145,6 +224,7 @@ PLATFORMS

DEPENDENCIES
fastlane
jazzy

BUNDLED WITH
1.16.0
1.16.1
35 changes: 26 additions & 9 deletions fastlane/Fastfile
Expand Up @@ -116,22 +116,40 @@ platform :ios do
lane :ci_archive do |options|
scheme = options[:scheme]
export_method = options[:export_method]
# keychains
certificates
archive(scheme: "#{scheme}",export_method: "#{export_method}")
end

desc "Bump both the framework projects"
lane :bump_all do
bump_framework(
framework:"Research"
)
bump_framework(
framework:"ResearchUI"
)
push_to_git_remote(remote_branch: ENV["TRAVIS_BRANCH"])
end

desc "Bump Framework Version"
lane :bump_framework do |options|
project = options[:project]
scheme = options[:scheme]
tag_name = options[:tag_name]
jazzy(config: "#{tag_name}/jazzy_config.yml")
framework = options[:framework]
project = "#{framework}/#{framework}.xcodeproj"
scheme = "#{framework} (iOS)"

ensure_git_status_clean

# bump the build
version_number = get_version_number(xcodeproj: "#{project}", target: "#{scheme}")
next_build_number = increment_build_number(xcodeproj: "#{project}")
commit_version_bump(xcodeproj: "#{project}", message: "[skip ci] Version Bump")
add_git_tag(tag: "#{tag_name}_#{version_number}_#{next_build_number}")
push_to_git_remote(remote_branch: ENV["TRAVIS_BRANCH"])
commit_version_bump(xcodeproj: "#{project}", message: "[skip ci] Version Bump #{framework}")
add_git_tag(tag: "#{framework}_#{version_number}_#{next_build_number}")

# Update the documentation
jazzy(config: "#{framework}/jazzy_config.yml")
git_add
git_commit(path: "Documentation/*", message: "[skip ci] Update Documentation #{framework}")
add_git_tag(tag: "#{framework}_docs_#{next_build_number}")
end

desc "Submit a new Build to appstore"
Expand All @@ -140,7 +158,6 @@ platform :ios do
scheme = options[:scheme]
export_method = options[:export_method]
ensure_git_status_clean
# keychains
certificates
version_number = get_version_number(xcodeproj: "#{project}", target: "#{scheme}")
next_build_number = increment_build_number(xcodeproj: "#{project}")
Expand Down
16 changes: 13 additions & 3 deletions fastlane/README.md
Expand Up @@ -31,11 +31,11 @@ Fetches provisioning profile and certificates from github repo
fastlane ios test
```
Execute tests
### build
### ios build
```
fastlane build
fastlane ios build
```
Build the scheme
Build target
### ios archive
```
fastlane ios archive
Expand All @@ -46,6 +46,16 @@ Archive and export app
fastlane ios ci_archive
```
This lane is for CI bots to archive and export
### ios bump_all
```
fastlane ios bump_all
```
Bump both the framework projects
### ios bump_framework
```
fastlane ios bump_framework
```
Bump Framework Version
### ios beta
```
fastlane ios beta
Expand Down
12 changes: 6 additions & 6 deletions travis/build.sh
Expand Up @@ -3,20 +3,20 @@ set -ex
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then # on pull requests
FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 bundle exec fastlane test scheme:"RSDCatalog"
FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 bundle exec fastlane test scheme:"RSDTest"
# bundle exec fastlane build scheme:"ResearchUI (watchOS)"
# bundle exec fastlane build scheme:"Research (tvOS)"
bundle exec fastlane build scheme:"ResearchUI (watchOS)"
bundle exec fastlane build scheme:"Research (tvOS)"
elif [[ -z "$TRAVIS_TAG" && "$TRAVIS_BRANCH" == "master" ]]; then # non-tag commits to master branch
FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 bundle exec fastlane test scheme:"RSDCatalog"
bundle exec fastlane keychains
bundle exec fastlane ci_archive scheme:"RSDCatalog" export_method:"app-store"
bundle exec fastlane ci_archive scheme:"RSDTest" export_method:"app-store"
# bundle exec fastlane build scheme:"ResearchUI (watchOS)"
# bundle exec fastlane build scheme:"Research (tvOS)"
bundle exec fastlane build scheme:"ResearchUI (watchOS)"
bundle exec fastlane build scheme:"Research (tvOS)"
bundle exec fastlane bump_all
elif [[ -z "$TRAVIS_TAG" && "$TRAVIS_BRANCH" =~ ^stable-.* ]]; then # non-tag commits to stable branches
FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 bundle exec fastlane test scheme:"RSDCatalog"
FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 bundle exec fastlane test scheme:"RSDTest"
bundle exec fastlane keychains
bundle exec fastlane bump_framework scheme:"Research (iOS)" tag_name:"Research" project:"Research/Research.xcodeproj"
bundle exec fastlane bump_framework scheme:"ResearchUI (iOS)" tag_name:"ResearchUI" project:"ResearchUI/ResearchUI.xcodeproj"
bundle exec fastlane beta scheme:"RSDCatalog" export_method:"app-store" project:"RSDCatalog/RSDCatalog.xcodeproj"
bundle exec fastlane beta scheme:"RSDTest" export_method:"app-store" project:"RSDTest/RSDTest.xcodeproj"
fi
Expand Down

0 comments on commit d2e7cca

Please sign in to comment.