Skip to content

Commit 5929b4b

Browse files
Merge pull request #26 from michael-patzer/MMC-2038_automate_deploy
Updated release step to use project's marketing_version if version is…
2 parents f5edec7 + 936f8e6 commit 5929b4b

File tree

3 files changed

+36
-32
lines changed

3 files changed

+36
-32
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

3-
gem "fastlane", "2.140.0"
3+
gem "fastlane", "2.143.0"
44

55
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
66
eval_gemfile(plugins_path) if File.exist?(plugins_path)

Gemfile.lock

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ GEM
55
addressable (2.7.0)
66
public_suffix (>= 2.0.2, < 5.0)
77
atomos (0.1.3)
8+
aws-eventstream (1.0.3)
9+
aws-sdk (2.11.470)
10+
aws-sdk-resources (= 2.11.470)
11+
aws-sdk-core (2.11.470)
12+
aws-sigv4 (~> 1.0)
13+
jmespath (~> 1.0)
14+
aws-sdk-resources (2.11.470)
15+
aws-sdk-core (= 2.11.470)
16+
aws-sigv4 (1.1.1)
17+
aws-eventstream (~> 1.0, >= 1.0.2)
818
babosa (1.0.3)
919
claide (1.0.3)
1020
colored (1.2)
@@ -13,12 +23,12 @@ GEM
1323
highline (~> 1.7.2)
1424
declarative (0.0.10)
1525
declarative-option (0.1.0)
16-
digest-crc (0.4.1)
26+
digest-crc (0.5.1)
1727
domain_name (0.5.20190701)
1828
unf (>= 0.0.5, < 1.0.0)
1929
dotenv (2.7.5)
2030
emoji_regex (1.0.1)
21-
excon (0.71.1)
31+
excon (0.73.0)
2232
faraday (0.17.3)
2333
multipart-post (>= 1.2, < 3)
2434
faraday-cookie_jar (0.0.6)
@@ -27,9 +37,10 @@ GEM
2737
faraday_middleware (0.13.1)
2838
faraday (>= 0.7.4, < 1.0)
2939
fastimage (2.1.7)
30-
fastlane (2.140.0)
40+
fastlane (2.143.0)
3141
CFPropertyList (>= 2.3, < 4.0.0)
3242
addressable (>= 2.3, < 3.0.0)
43+
aws-sdk (~> 2.3)
3344
babosa (>= 1.0.2, < 2.0.0)
3445
bundler (>= 1.12.0, < 3.0.0)
3546
colored
@@ -73,19 +84,21 @@ GEM
7384
representable (~> 3.0)
7485
retriable (>= 2.0, < 4.0)
7586
signet (~> 0.12)
76-
google-cloud-core (1.4.1)
87+
google-cloud-core (1.5.0)
7788
google-cloud-env (~> 1.0)
78-
google-cloud-env (1.3.0)
79-
faraday (~> 0.11)
89+
google-cloud-errors (~> 1.0)
90+
google-cloud-env (1.3.1)
91+
faraday (>= 0.17.3, < 2.0)
92+
google-cloud-errors (1.0.0)
8093
google-cloud-storage (1.25.1)
8194
addressable (~> 2.5)
8295
digest-crc (~> 0.4)
8396
google-api-client (~> 0.33)
8497
google-cloud-core (~> 1.2)
8598
googleauth (~> 0.9)
8699
mini_mime (~> 1.0)
87-
googleauth (0.10.0)
88-
faraday (~> 0.12)
100+
googleauth (0.11.0)
101+
faraday (>= 0.17.3, < 2.0)
89102
jwt (>= 1.4, < 3.0)
90103
memoist (~> 0.16)
91104
multi_json (~> 1.11)
@@ -95,6 +108,7 @@ GEM
95108
http-cookie (1.0.3)
96109
domain_name (~> 0.5)
97110
httpclient (2.8.3)
111+
jmespath (1.4.0)
98112
json (2.3.0)
99113
jwt (2.1.0)
100114
memoist (0.16.2)
@@ -116,29 +130,29 @@ GEM
116130
rouge (2.0.7)
117131
rubyzip (1.3.0)
118132
security (0.1.3)
119-
signet (0.12.0)
133+
signet (0.13.0)
120134
addressable (~> 2.3)
121-
faraday (~> 0.9)
135+
faraday (>= 0.17.3, < 2.0)
122136
jwt (>= 1.5, < 3.0)
123137
multi_json (~> 1.10)
124-
simctl (1.6.7)
138+
simctl (1.6.8)
125139
CFPropertyList
126140
naturally
127141
slack-notifier (2.3.2)
128142
terminal-notifier (2.0.0)
129143
terminal-table (1.8.0)
130144
unicode-display_width (~> 1.1, >= 1.1.1)
131-
tty-cursor (0.7.0)
132-
tty-screen (0.7.0)
133-
tty-spinner (0.9.2)
145+
tty-cursor (0.7.1)
146+
tty-screen (0.7.1)
147+
tty-spinner (0.9.3)
134148
tty-cursor (~> 0.7)
135149
uber (0.1.0)
136150
unf (0.1.4)
137151
unf_ext
138152
unf_ext (0.0.7.6)
139-
unicode-display_width (1.6.0)
153+
unicode-display_width (1.7.0)
140154
word_wrap (1.0.0)
141-
xcodeproj (1.14.0)
155+
xcodeproj (1.15.0)
142156
CFPropertyList (>= 2.3.3, < 4.0)
143157
atomos (~> 0.1.3)
144158
claide (>= 1.0.2, < 2.0)
@@ -153,7 +167,7 @@ PLATFORMS
153167
ruby
154168

155169
DEPENDENCIES
156-
fastlane (= 2.140.0)
170+
fastlane (= 2.143.0)
157171

158172
BUNDLED WITH
159-
2.0.2
173+
2.1.4

fastlane/Fastfile

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ platform :ios do
6262
desc "Create a release candidate for a given version"
6363
lane :release do |args|
6464
# Check for version argument
65-
version = args[:version] || ENV['MAILCHIMP_SDK_VERSION'] || branch_version
65+
version = args[:version] || ENV['MAILCHIMP_SDK_VERSION'] || marketing_version
6666
if version.nil?
6767
UI.user_error! "Version not provided through argument, environment variable, or release branch name. Try running: `fastlane release version:MAJOR.MINOR.PATCH` or setting the environment variable named MAILCHIMP_SDK_VERSION, where MAJOR.MINOR.PATCH represents the version number."
6868
end
@@ -112,16 +112,6 @@ def output_path
112112
return ENV.fetch('BITRISE_DEPLOY_DIR', "../build")
113113
end
114114

115-
def branch_version
116-
# https://rubular.com/r/A8FeXBzT1z4zJR
117-
version_regex = /^releases\/v(\d+\.\d+(\.\d+)*)$/
118-
119-
if matches = git_branch.match(version_regex)
120-
version = matches.captures[0]
121-
puts "Version: #{version}"
122-
return version
123-
else
124-
puts "No version number found in \"#{git_branch}\""
125-
end
126-
return nil
115+
def marketing_version
116+
get_version_number(xcodeproj: "MailchimpSDK/MailchimpSDK.xcodeproj")
127117
end

0 commit comments

Comments
 (0)