Skip to content

Commit

Permalink
Merge pull request #26 from michael-patzer/MMC-2038_automate_deploy
Browse files Browse the repository at this point in the history
Updated release step to use project's marketing_version if version is…
  • Loading branch information
michael-patzer authored Mar 19, 2020
2 parents f5edec7 + 936f8e6 commit 5929b4b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "fastlane", "2.140.0"
gem "fastlane", "2.143.0"

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
50 changes: 32 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
atomos (0.1.3)
aws-eventstream (1.0.3)
aws-sdk (2.11.470)
aws-sdk-resources (= 2.11.470)
aws-sdk-core (2.11.470)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.11.470)
aws-sdk-core (= 2.11.470)
aws-sigv4 (1.1.1)
aws-eventstream (~> 1.0, >= 1.0.2)
babosa (1.0.3)
claide (1.0.3)
colored (1.2)
Expand All @@ -13,12 +23,12 @@ GEM
highline (~> 1.7.2)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
digest-crc (0.5.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
emoji_regex (1.0.1)
excon (0.71.1)
excon (0.73.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
Expand All @@ -27,9 +37,10 @@ GEM
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.7)
fastlane (2.140.0)
fastlane (2.143.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk (~> 2.3)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
Expand Down Expand Up @@ -73,19 +84,21 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.4.1)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.3.0)
faraday (~> 0.11)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.10.0)
faraday (~> 0.12)
googleauth (0.11.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
Expand All @@ -95,6 +108,7 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
json (2.3.0)
jwt (2.1.0)
memoist (0.16.2)
Expand All @@ -116,29 +130,29 @@ GEM
rouge (2.0.7)
rubyzip (1.3.0)
security (0.1.3)
signet (0.12.0)
signet (0.13.0)
addressable (~> 2.3)
faraday (~> 0.9)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.7)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.2)
tty-cursor (0.7.1)
tty-screen (0.7.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
unicode-display_width (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.14.0)
xcodeproj (1.15.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -153,7 +167,7 @@ PLATFORMS
ruby

DEPENDENCIES
fastlane (= 2.140.0)
fastlane (= 2.143.0)

BUNDLED WITH
2.0.2
2.1.4
16 changes: 3 additions & 13 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ platform :ios do
desc "Create a release candidate for a given version"
lane :release do |args|
# Check for version argument
version = args[:version] || ENV['MAILCHIMP_SDK_VERSION'] || branch_version
version = args[:version] || ENV['MAILCHIMP_SDK_VERSION'] || marketing_version
if version.nil?
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."
end
Expand Down Expand Up @@ -112,16 +112,6 @@ def output_path
return ENV.fetch('BITRISE_DEPLOY_DIR', "../build")
end

def branch_version
# https://rubular.com/r/A8FeXBzT1z4zJR
version_regex = /^releases\/v(\d+\.\d+(\.\d+)*)$/

if matches = git_branch.match(version_regex)
version = matches.captures[0]
puts "Version: #{version}"
return version
else
puts "No version number found in \"#{git_branch}\""
end
return nil
def marketing_version
get_version_number(xcodeproj: "MailchimpSDK/MailchimpSDK.xcodeproj")
end

0 comments on commit 5929b4b

Please sign in to comment.