Skip to content

Commit a4736eb

Browse files
committed
Merge branch 'feature/ci-caching' into develop
2 parents f90a9e9 + f9eaf8f commit a4736eb

File tree

5 files changed

+35
-26
lines changed

5 files changed

+35
-26
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ before_install:
1313
- brew bundle
1414
install:
1515
- bundle install --without development --deployment --jobs=3 --retry=3
16-
- bundle exec pod repo update
17-
- bundle exec pod install
16+
- sh ./scripts/pod-install-if-needed.sh
1817
before_script:
1918
- bundle exec danger
2019
script:

Dangerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22

33
# Sometimes it's a README fix, or something like that - which isn't relevant for
44
# including in a project's CHANGELOG for example
5-
declared_trivial = pr_title.include? "#trivial"
5+
declared_trivial = (github.pr_title + github.pr_body).include?("#trivial")
66

77
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
88
warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]"
99

1010
# Warn when there is a big PR
1111
warn("Big PR") if lines_of_code > 500
1212

13-
# Don't let testing shortcuts get into master by accident
14-
fail("fdescribe left in tests") if `grep -r fdescribe specs/`.length > 1
15-
fail("fit left in tests") if `grep -r "fit specs/ `.length > 1
13+
# Ensure there is a summary for a PR
14+
fail "Please provide a summary in the Pull Request description" if github.pr_body.length < 5
1615

1716
# Add a CHANGELOG entry for app changes
1817
if git.lines_of_code > 50 && !github.modified_files.include?("CHANGELOG.md") && !declared_trivial
1918
fail("Please update [CHANGELOG.md](https://github.com/polydice/iCook-tvOS/blob/develop/CHANGELOG.md).")
2019
end
2120

2221
# Ensure a clean commits history
23-
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
22+
if git.commits.any? { |c| c.message =~ /^Merge branch/ }
2423
fail('Please rebase to get rid of the merge commits in this PR')
2524
end

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ ruby "2.3.1"
33

44
gem "cocoapods", "~> 1.1.0"
55
gem "cocoapods-keys"
6-
gem "danger", "~> 0.10.0"
6+
gem "danger", "~> 4.0.0"
77
gem "scan"
88
gem "slather"

Gemfile.lock

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
GEM
22
remote: http://rubygems.org/
33
specs:
4+
CFPropertyList (2.3.3)
45
RubyInline (3.12.4)
56
ZenTest (~> 4.3)
67
ZenTest (4.11.1)
@@ -13,7 +14,7 @@ GEM
1314
addressable (2.4.0)
1415
babosa (1.0.2)
1516
claide (1.0.1)
16-
claide-plugins (0.9.1)
17+
claide-plugins (0.9.2)
1718
cork
1819
nap
1920
open4 (~> 1.3)
@@ -63,16 +64,16 @@ GEM
6364
commander (>= 4.3.5)
6465
highline (>= 1.7.1)
6566
security
66-
danger (0.10.1)
67+
danger (4.0.0)
6768
claide (~> 1.0)
68-
claide-plugins (~> 0.9)
69+
claide-plugins (>= 0.9.2)
6970
colored (~> 1.2)
7071
cork (~> 0.1)
71-
faraday (~> 0)
72+
faraday (~> 0.9)
7273
faraday-http-cache (~> 1.0)
7374
git (~> 1)
75+
kramdown (~> 1.5)
7476
octokit (~> 4.2)
75-
redcarpet (~> 3.3)
7677
terminal-table (~> 1)
7778
dotenv (2.1.1)
7879
escape (0.0.4)
@@ -101,34 +102,33 @@ GEM
101102
highline (1.7.8)
102103
i18n (0.7.0)
103104
json (1.8.3)
105+
kramdown (1.12.0)
104106
mini_portile2 (2.1.0)
105107
minitest (5.9.1)
106108
molinillo (0.5.2)
107109
multi_json (1.12.1)
108110
multipart-post (2.0.0)
111+
nanaimo (0.2.2)
109112
nap (1.1.0)
110113
netrc (0.7.8)
111-
nokogiri (1.6.8)
114+
nokogiri (1.6.8.1)
112115
mini_portile2 (~> 2.1.0)
113-
pkg-config (~> 1.1.7)
114-
octokit (4.3.0)
116+
octokit (4.4.1)
115117
sawyer (~> 0.7.0, >= 0.5.3)
116118
open4 (1.3.4)
117119
osx_keychain (1.0.1)
118120
RubyInline (~> 3)
119-
pkg-config (1.1.7)
120121
plist (3.2.0)
121-
redcarpet (3.3.4)
122122
rouge (1.11.1)
123123
rubyzip (1.1.7)
124124
sawyer (0.7.0)
125125
addressable (>= 2.3.5, < 2.5)
126126
faraday (~> 0.8, < 0.10)
127-
scan (0.13.1)
128-
fastlane_core (>= 0.52.1, < 1.0.0)
127+
scan (0.14.1)
128+
fastlane_core (>= 0.53.0, < 1.0.0)
129129
slack-notifier (~> 1.3)
130-
terminal-table
131-
xcpretty (>= 0.2.2)
130+
terminal-table (>= 1.4.5, < 2.0.0)
131+
xcpretty (>= 0.2.4, < 1.0.0)
132132
xcpretty-travis-formatter (>= 0.0.3)
133133
security (0.1.3)
134134
slack-notifier (1.5.1)
@@ -143,10 +143,12 @@ GEM
143143
tzinfo (1.2.2)
144144
thread_safe (~> 0.1)
145145
unicode-display_width (1.1.1)
146-
xcodeproj (1.3.3)
146+
xcodeproj (1.4.1)
147+
CFPropertyList (~> 2.3.3)
147148
activesupport (>= 3)
148149
claide (>= 1.0.1, < 2.0)
149150
colored (~> 1.2)
151+
nanaimo (~> 0.2.0)
150152
xcpretty (0.2.4)
151153
rouge (~> 1.8)
152154
xcpretty-travis-formatter (0.0.4)
@@ -158,12 +160,12 @@ PLATFORMS
158160
DEPENDENCIES
159161
cocoapods (~> 1.1.0)
160162
cocoapods-keys
161-
danger (~> 0.10.0)
163+
danger (~> 4.0.0)
162164
scan
163165
slather
164166

165167
RUBY VERSION
166-
ruby 2.3.0p0
168+
ruby 2.3.1p112
167169

168170
BUNDLED WITH
169-
1.12.5
171+
1.13.6

scripts/pod-install-if-needed.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
if cmp -s Podfile.lock Pods/Podfile.lock; then
4+
echo "Using cached CocoaPods dependencies"
5+
else
6+
bundle exec pod repo update
7+
bundle exec pod install
8+
cp -v Podfile.lock Pods
9+
fi

0 commit comments

Comments
 (0)