fastlane 1.68.0 → 1.69.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets/DefaultFastfileTemplate +3 -6
  3. data/lib/assets/FastfileTemplateAndroid +3 -5
  4. data/lib/assets/custom_action_template.rb +2 -2
  5. data/lib/fastlane/action.rb +1 -1
  6. data/lib/fastlane/actions/actions_helper.rb +2 -2
  7. data/lib/fastlane/actions/appaloosa.rb +1 -1
  8. data/lib/fastlane/actions/appetize.rb +70 -51
  9. data/lib/fastlane/actions/appium.rb +3 -3
  10. data/lib/fastlane/actions/appledoc.rb +1 -1
  11. data/lib/fastlane/actions/backup_xcarchive.rb +2 -2
  12. data/lib/fastlane/actions/badge.rb +8 -8
  13. data/lib/fastlane/actions/carthage.rb +22 -9
  14. data/lib/fastlane/actions/changelog_from_git_commits.rb +4 -4
  15. data/lib/fastlane/actions/chatwork.rb +2 -2
  16. data/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
  17. data/lib/fastlane/actions/cocoapods.rb +1 -1
  18. data/lib/fastlane/actions/commit_version_bump.rb +6 -6
  19. data/lib/fastlane/actions/crashlytics.rb +7 -7
  20. data/lib/fastlane/actions/default_platform.rb +1 -1
  21. data/lib/fastlane/actions/deploygate.rb +19 -6
  22. data/lib/fastlane/actions/dotgpg_environment.rb +1 -1
  23. data/lib/fastlane/actions/download.rb +1 -1
  24. data/lib/fastlane/actions/download_dsyms.rb +31 -2
  25. data/lib/fastlane/actions/dsym_zip.rb +1 -1
  26. data/lib/fastlane/actions/ensure_git_branch.rb +1 -1
  27. data/lib/fastlane/actions/ensure_no_debug_code.rb +2 -2
  28. data/lib/fastlane/actions/ensure_xcode_version.rb +1 -1
  29. data/lib/fastlane/actions/fastlane_version.rb +2 -2
  30. data/lib/fastlane/actions/frameit.rb +1 -1
  31. data/lib/fastlane/actions/gcovr.rb +1 -1
  32. data/lib/fastlane/actions/get_build_number.rb +2 -2
  33. data/lib/fastlane/actions/get_build_number_repository.rb +1 -1
  34. data/lib/fastlane/actions/get_github_release.rb +3 -3
  35. data/lib/fastlane/actions/get_info_plist_value.rb +1 -1
  36. data/lib/fastlane/actions/get_version_number.rb +2 -2
  37. data/lib/fastlane/actions/git_add.rb +2 -2
  38. data/lib/fastlane/actions/git_commit.rb +2 -2
  39. data/lib/fastlane/actions/git_pull.rb +1 -1
  40. data/lib/fastlane/actions/gradle.rb +1 -1
  41. data/lib/fastlane/actions/hg_commit_version_bump.rb +7 -7
  42. data/lib/fastlane/actions/hipchat.rb +7 -7
  43. data/lib/fastlane/actions/hockey.rb +8 -8
  44. data/lib/fastlane/actions/increment_build_number.rb +2 -2
  45. data/lib/fastlane/actions/increment_version_number.rb +4 -4
  46. data/lib/fastlane/actions/install_on_device.rb +3 -3
  47. data/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
  48. data/lib/fastlane/actions/installr.rb +3 -3
  49. data/lib/fastlane/actions/ipa.rb +1 -1
  50. data/lib/fastlane/actions/latest_testflight_build_number.rb +1 -1
  51. data/lib/fastlane/actions/lcov.rb +1 -1
  52. data/lib/fastlane/actions/nexus_upload.rb +1 -1
  53. data/lib/fastlane/actions/number_of_commits.rb +1 -1
  54. data/lib/fastlane/actions/oclint.rb +2 -2
  55. data/lib/fastlane/actions/onesignal.rb +3 -3
  56. data/lib/fastlane/actions/pod_push.rb +3 -3
  57. data/lib/fastlane/actions/podio_item.rb +11 -11
  58. data/lib/fastlane/actions/read_podspec.rb +1 -1
  59. data/lib/fastlane/actions/register_devices.rb +6 -6
  60. data/lib/fastlane/actions/reset_git_repo.rb +1 -1
  61. data/lib/fastlane/actions/resign.rb +3 -3
  62. data/lib/fastlane/actions/restore_file.rb +1 -1
  63. data/lib/fastlane/actions/s3.rb +4 -4
  64. data/lib/fastlane/actions/say.rb +1 -1
  65. data/lib/fastlane/actions/set_github_release.rb +10 -10
  66. data/lib/fastlane/actions/set_info_plist_value.rb +1 -1
  67. data/lib/fastlane/actions/slack.rb +2 -2
  68. data/lib/fastlane/actions/slather.rb +1 -1
  69. data/lib/fastlane/actions/sonar.rb +2 -2
  70. data/lib/fastlane/actions/splunkmint.rb +3 -3
  71. data/lib/fastlane/actions/ssh.rb +1 -1
  72. data/lib/fastlane/actions/supply.rb +6 -1
  73. data/lib/fastlane/actions/swiftlint.rb +3 -3
  74. data/lib/fastlane/actions/team_id.rb +1 -1
  75. data/lib/fastlane/actions/team_name.rb +1 -1
  76. data/lib/fastlane/actions/testfairy.rb +3 -3
  77. data/lib/fastlane/actions/testmunk.rb +5 -5
  78. data/lib/fastlane/actions/tryouts.rb +6 -6
  79. data/lib/fastlane/actions/typetalk.rb +2 -2
  80. data/lib/fastlane/actions/unlock_keychain.rb +1 -1
  81. data/lib/fastlane/actions/update_app_group_identifiers.rb +6 -6
  82. data/lib/fastlane/actions/update_app_identifier.rb +6 -6
  83. data/lib/fastlane/actions/update_info_plist.rb +4 -4
  84. data/lib/fastlane/actions/update_project_code_signing.rb +2 -2
  85. data/lib/fastlane/actions/update_project_provisioning.rb +4 -4
  86. data/lib/fastlane/actions/update_project_team.rb +2 -2
  87. data/lib/fastlane/actions/update_url_schemes.rb +1 -1
  88. data/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -0
  89. data/lib/fastlane/actions/upload_symbols_to_sentry.rb +3 -3
  90. data/lib/fastlane/actions/verify_build.rb +13 -13
  91. data/lib/fastlane/actions/verify_xcode.rb +2 -2
  92. data/lib/fastlane/actions/version_bump_podspec.rb +3 -3
  93. data/lib/fastlane/actions/version_get_podspec.rb +2 -2
  94. data/lib/fastlane/actions/xcode_install.rb +1 -1
  95. data/lib/fastlane/actions/xcode_select.rb +2 -2
  96. data/lib/fastlane/actions/xcode_server_get_assets.rb +10 -10
  97. data/lib/fastlane/actions/xcodebuild.rb +2 -2
  98. data/lib/fastlane/actions/xctool.rb +1 -1
  99. data/lib/fastlane/actions/zip.rb +58 -0
  100. data/lib/fastlane/command_line_handler.rb +1 -1
  101. data/lib/fastlane/documentation/actions_list.rb +1 -1
  102. data/lib/fastlane/erb_template_helper.rb +1 -1
  103. data/lib/fastlane/helper/crashlytics_helper.rb +5 -5
  104. data/lib/fastlane/helper/git_helper.rb +2 -1
  105. data/lib/fastlane/helper/gradle_helper.rb +0 -2
  106. data/lib/fastlane/helper/podspec_helper.rb +2 -2
  107. data/lib/fastlane/lane_manager.rb +3 -3
  108. data/lib/fastlane/one_off.rb +3 -3
  109. data/lib/fastlane/runner.rb +7 -7
  110. data/lib/fastlane/setup/setup.rb +1 -2
  111. data/lib/fastlane/supported_platforms.rb +1 -1
  112. data/lib/fastlane/version.rb +1 -1
  113. metadata +20 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d59616b248f69f0e037947a03d2b51396e0af935
4
- data.tar.gz: ac1772bb6d27c37034440d16aebc44221338efd7
3
+ metadata.gz: 5d29b7501225e604d391ffd243a2749404958456
4
+ data.tar.gz: ec1bac264e401af22eaaa8e92373296aa37c1fdf
5
5
  SHA512:
6
- metadata.gz: bac4da3473571bbac2733683cb6553ee8d530737fd64afc7e4a850727641c6a428b0e91a8c11c0f08403d7e44ef1f34815d9f09d74a9bb6d380563ec102cd5c8
7
- data.tar.gz: 9b049a4e393e2898630c709e9f46bcec53ab27fabd941165199150b9513fc87b86e27df6b34bed9dacbd5d31494dd50d22daf99bea45bebfecce97df130703f5
6
+ metadata.gz: b5495fdc7b764fa11edf7845aab397165a676ae8a25c401bcd23adf6ae04de0ea46138d90429ebc10b1b218e1e89cc7b2f6589e1656536e0fcc4a7509d8ea34b
7
+ data.tar.gz: 388a06e91c69148dad378c7466f7455a2d687c0cf623fb205548866a81c5f3e657b9b0af81780435ed1fc33c4b2a47037401784575360e4bcac425dea7166066
@@ -6,11 +6,6 @@
6
6
  # Change the syntax highlighting to Ruby
7
7
  # All lines starting with a # are ignored when running `fastlane`
8
8
 
9
- # By default, fastlane will send which actions are used
10
- # No personal data is shared, more information on https://github.com/fastlane/enhancer
11
- # Uncomment the following line to opt out
12
- # opt_out_usage
13
-
14
9
  # If you want to automatically update fastlane if a new version is available:
15
10
  # update_fastlane
16
11
 
@@ -71,6 +66,8 @@ platform :ios do
71
66
  end
72
67
 
73
68
 
74
-
75
69
  # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md
76
70
  # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
71
+
72
+ # fastlane reports which actions are used
73
+ # No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
@@ -6,11 +6,6 @@
6
6
  # Change the syntax highlighting to Ruby
7
7
  # All lines starting with a # are ignored when running `fastlane`
8
8
 
9
- # By default, fastlane will send which actions are used
10
- # No personal data is shared, more information on https://github.com/fastlane/enhancer
11
- # Uncomment the following line to opt out
12
- # opt_out_usage
13
-
14
9
  # If you want to automatically update fastlane if a new version is available:
15
10
  # update_fastlane
16
11
 
@@ -66,3 +61,6 @@ end
66
61
 
67
62
  # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/docs/Platforms.md
68
63
  # All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
64
+
65
+ # fastlane reports which actions are used
66
+ # No personal data is sent or shared. Learn more at https://github.com/fastlane/enhancer
@@ -43,8 +43,8 @@ module Fastlane
43
43
  env_name: "FL_[[NAME_UP]]_API_TOKEN", # The name of the environment variable
44
44
  description: "API Token for [[NAME_CLASS]]", # a short description of this parameter
45
45
  verify_block: proc do |value|
46
- raise "No API token for [[NAME_CLASS]] given, pass using `api_token: 'token'`".red unless (value and not value.empty?)
47
- # raise "Couldn't find file at path '#{value}'".red unless File.exist?(value)
46
+ UI.user_error!("No API token for [[NAME_CLASS]] given, pass using `api_token: 'token'`") unless (value and not value.empty?)
47
+ # UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
48
48
  end),
49
49
  FastlaneCore::ConfigItem.new(key: :development,
50
50
  env_name: "FL_[[NAME_UP]]_DEVELOPMENT",
@@ -53,7 +53,7 @@ module Fastlane
53
53
  #
54
54
  # [:ios, :mac].include?(platform)
55
55
  #
56
- raise "Implementing `is_supported?` for all actions is mandatory. Please update #{self}".red
56
+ UI.crash!("Implementing `is_supported?` for all actions is mandatory. Please update #{self}")
57
57
  end
58
58
 
59
59
  # Is printed out in the Steps: output in the terminal
@@ -25,7 +25,7 @@ module Fastlane
25
25
  # This might be nil, in which case the step is not printed out to the terminal
26
26
  def self.execute_action(step_name)
27
27
  start = Time.now # before the raise block, since `start` is required in the ensure block
28
- raise 'No block given'.red unless block_given?
28
+ UI.crash!("No block given") unless block_given?
29
29
 
30
30
  error = nil
31
31
  exc = nil
@@ -75,7 +75,7 @@ module Fastlane
75
75
  end
76
76
 
77
77
  def self.load_external_actions(path)
78
- raise 'You need to pass a valid path' unless File.exist?(path)
78
+ UI.user_error!("You need to pass a valid path") unless File.exist?(path)
79
79
 
80
80
  Dir[File.expand_path('*.rb', path)].each do |file|
81
81
  require file
@@ -180,7 +180,7 @@ module Fastlane
180
180
  description: 'Binary path. Optional for ipa if you use the `ipa` or `xcodebuild` action',
181
181
  default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
182
182
  verify_block: proc do |value|
183
- raise "Couldn't find ipa || apk file at path '#{value}'".red unless File.exist?(value)
183
+ UI.user_error!("Couldn't find ipa || apk file at path '#{value}'") unless File.exist?(value)
184
184
  end),
185
185
  FastlaneCore::ConfigItem.new(key: :api_token,
186
186
  env_name: 'FL_APPALOOSA_API_TOKEN',
@@ -8,39 +8,62 @@ module Fastlane
8
8
  end
9
9
 
10
10
  class AppetizeAction < Action
11
- APPETIZE_URL_BASE = 'https://api.appetize.io/v1/app/update'
12
-
13
11
  def self.is_supported?(platform)
14
12
  platform == :ios
15
13
  end
16
14
 
17
15
  def self.run(options)
18
16
  require 'net/http'
17
+ require 'net/http/post/multipart'
19
18
  require 'uri'
20
19
  require 'json'
21
20
 
22
- uri = URI.parse(APPETIZE_URL_BASE)
23
- https = Net::HTTP.new(uri.host, uri.port)
24
- https.use_ssl = true
25
-
26
- req = Net::HTTP::Post.new(uri.request_uri, initheader: {'Content-Type' => 'application/json'})
27
21
  params = {
28
- token: options[:api_token],
29
- url: options[:url],
30
22
  platform: 'ios'
31
23
  }
32
24
 
33
- params[:privateKey] = options[:private_key] unless options[:private_key].nil?
34
- req.body = JSON.generate(params)
35
- response = https.request(req)
25
+ if options[:path]
26
+ params[:file] = UploadIO.new(options[:path], 'application/zip')
27
+ else
28
+ UI.user_error!('url parameter is required if no file path is specified') if options[:url].nil?
29
+ params[:url] = options[:url]
30
+ end
31
+
32
+ params[:note] = options[:note] if options[:note].to_s.length > 0
33
+
34
+ uri = URI.parse(appetize_url(options))
35
+ req = create_request(uri, params)
36
+ req.basic_auth(options[:api_token], nil)
36
37
 
37
- raise 'Error when trying to upload ipa to Appetize.io'.red unless parse_response(response)
38
+ http = Net::HTTP.new(uri.host, uri.port)
39
+ http.use_ssl = true
40
+
41
+ response = http.request(req)
42
+
43
+ UI.user_error!("Error uploading app to Appetize.io") unless parse_response(response)
38
44
  UI.message("App URL: #{Actions.lane_context[SharedValues::APPETIZE_APP_URL]}")
39
45
  UI.message("Manage URL: #{Actions.lane_context[SharedValues::APPETIZE_MANAGE_URL]}")
40
46
  UI.message("App Private Key: #{Actions.lane_context[SharedValues::APPETIZE_PRIVATE_KEY]}")
41
47
  UI.success("Build successfully uploaded to Appetize.io")
42
48
  end
43
49
 
50
+ def self.appetize_url(options)
51
+ "https://api.appetize.io/v1/apps/#{options[:public_key]}"
52
+ end
53
+ private_class_method :appetize_url
54
+
55
+ def self.create_request(uri, params)
56
+ if params[:url]
57
+ req = Net::HTTP::Post.new(uri.request_uri, initheader: {'Content-Type' => 'application/json'})
58
+ req.body = JSON.generate(params)
59
+ else
60
+ req = Net::HTTP::Post::Multipart.new(uri.path, params)
61
+ end
62
+
63
+ req
64
+ end
65
+ private_class_method :create_request
66
+
44
67
  def self.parse_response(response)
45
68
  body = JSON.parse(response.body)
46
69
  app_url = body['appURL']
@@ -55,61 +78,57 @@ module Fastlane
55
78
  return true
56
79
  rescue
57
80
  UI.error("Error uploading to Appetize.io: #{response.body}")
58
- help_message(response)
59
81
  return false
60
82
  end
61
83
  private_class_method :parse_response
62
84
 
63
- def self.help_message(response)
64
- message = case response.body
65
- when 'Invalid token'
66
- 'Invalid API Token specified.'
67
- when 'Error downloading zip file'
68
- 'URL should be wrong'
69
- when 'No app with specified privateKey found'
70
- 'Invalid privateKey specified'
71
- end
72
- UI.error(message) if message
73
- end
74
- private_class_method :help_message
75
-
76
85
  def self.description
77
86
  "Create or Update apps on Appetize.io"
78
87
  end
79
88
 
80
89
  def self.available_options
81
- [FastlaneCore::ConfigItem.new(key: :api_token,
82
- env_name: "APPETIZE_API_TOKEN",
83
- description: "Appetize.io API Token",
84
- is_string: true,
85
- verify_block: proc do |value|
86
- raise "No API Token for Appetize.io given, pass using `api_token: 'token'`".red unless value.to_s.length > 0
87
- end),
88
- FastlaneCore::ConfigItem.new(key: :url,
89
- env_name: "APPETIZE_URL",
90
- description: "Target url of the zipped build",
91
- is_string: true,
92
- verify_block: proc do |value|
93
- raise "No URL of your zipped build".red unless value.to_s.length > 0
94
- end),
95
- FastlaneCore::ConfigItem.new(key: :private_key,
96
- env_name: "APPETIZE_PRIVATEKEY",
97
- description: "privateKey which specify each applications",
98
- optional: true)
90
+ [
91
+ FastlaneCore::ConfigItem.new(key: :api_token,
92
+ env_name: "APPETIZE_API_TOKEN",
93
+ description: "Appetize.io API Token",
94
+ is_string: true,
95
+ verify_block: proc do |value|
96
+ UI.user_error!("No API Token for Appetize.io given, pass using `api_token: 'token'`") unless value.to_s.length > 0
97
+ end),
98
+ FastlaneCore::ConfigItem.new(key: :url,
99
+ env_name: "APPETIZE_URL",
100
+ description: "Target url of the zipped build. Either this or `path` must be specified",
101
+ is_string: true,
102
+ optional: true),
103
+ FastlaneCore::ConfigItem.new(key: :path,
104
+ env_name: "APPETIZE_FILE_PATH",
105
+ description: "Path to zipped build on the local filesystem. Either this or `url` must be specified",
106
+ is_string: true,
107
+ optional: true),
108
+ FastlaneCore::ConfigItem.new(key: :public_key,
109
+ env_name: "APPETIZE_PUBLICKEY",
110
+ description: "Public key of the app you wish to update. If not provided, then a new app entry will be created on Appetize.io",
111
+ is_string: true,
112
+ optional: true),
113
+ FastlaneCore::ConfigItem.new(key: :note,
114
+ env_name: "APPETIZE_NOTE",
115
+ description: "Notes you wish to add to the uploaded app",
116
+ is_string: true,
117
+ optional: true)
99
118
  ]
100
119
  end
101
120
 
102
121
  def self.output
103
122
  [
104
- ['APPETIZE_PRIVATE_KEY', 'a string that is used to prove "ownership" of your app - save this so that you may subsequently update the app'],
105
- ['APPETIZE_PUBLIC_KEY', 'a public identiifer for your app'],
106
- ['APPETIZE_APP_URL', 'a page to test and share your app'],
107
- ['APPETIZE_MANAGE_URL', 'a page to manage your app']
123
+ ['APPETIZE_PRIVATE_KEY', 'a string that is used to prove "ownership" of your app.'],
124
+ ['APPETIZE_PUBLIC_KEY', 'a public identiifer for your app. Use this to update your app after it has been initially created'],
125
+ ['APPETIZE_APP_URL', 'a page to test and share your app.'],
126
+ ['APPETIZE_MANAGE_URL', 'a page to manage your app.']
108
127
  ]
109
128
  end
110
129
 
111
- def self.author
112
- "giginet"
130
+ def self.authors
131
+ ["klundberg", "giginet"]
113
132
  end
114
133
  end
115
134
  end
@@ -29,7 +29,7 @@ module Fastlane
29
29
  rspec_args << params[:spec_path]
30
30
  status = RSpec::Core::Runner.run(rspec_args).to_i
31
31
  if status != 0
32
- raise "Failed to run Appium spec. status code: #{status}".red
32
+ UI.user_error!("Failed to run Appium spec. status code: #{status}")
33
33
  end
34
34
  ensure
35
35
  Actions.sh "kill #{appium_pid}" if appium_pid
@@ -54,7 +54,7 @@ module Fastlane
54
54
  end
55
55
 
56
56
  unless File.exist?(appium_path)
57
- raise 'You have to install Appium using `npm install -g appium`'.red
57
+ UI.user_error!("You have to install Appium using `npm install -g appium`")
58
58
  end
59
59
 
60
60
  if appium_path.end_with?('.app')
@@ -70,7 +70,7 @@ module Fastlane
70
70
  break if `lsof -i:#{params[:port]}`.to_s.length != 0
71
71
 
72
72
  if count * 5 > INVOKE_TIMEOUT
73
- raise 'Invoke Appium server timed out'.red
73
+ UI.user_error!("Invoke Appium server timed out")
74
74
  end
75
75
  sleep 5
76
76
  end
@@ -55,7 +55,7 @@ module Fastlane
55
55
  def self.run(params)
56
56
  unless Helper.test?
57
57
  UI.message("Install using `brew install homebrew/boneyard/appledoc`")
58
- raise "appledoc not installed".red if `which appledoc`.length == 0
58
+ UI.user_error!("appledoc not installed") if `which appledoc`.length == 0
59
59
  end
60
60
 
61
61
  params_hash = params.values
@@ -66,14 +66,14 @@ module Fastlane
66
66
  optional: false,
67
67
  env_name: 'BACKUP_XCARCHIVE_ARCHIVE',
68
68
  verify_block: proc do |value|
69
- raise "Couldn't find xcarchive file at path '#{value}'".red if !Helper.test? && !File.exist?(value)
69
+ UI.user_error!("Couldn't find xcarchive file at path '#{value}'") if !Helper.test? && !File.exist?(value)
70
70
  end),
71
71
  FastlaneCore::ConfigItem.new(key: :destination,
72
72
  description: 'Where your archive will be placed',
73
73
  optional: false,
74
74
  env_name: 'BACKUP_XCARCHIVE_DESTINATION',
75
75
  verify_block: proc do |value|
76
- raise "Couldn't find the destination folder at '#{value}'".red if !Helper.test? && !File.directory?(value) && !File.exist?(value)
76
+ UI.user_error!("Couldn't find the destination folder at '#{value}'") if !Helper.test? && !File.directory?(value) && !File.exist?(value)
77
77
  end),
78
78
  FastlaneCore::ConfigItem.new(key: :zip,
79
79
  description: 'Enable compression of the archive. Default value `true`',
@@ -43,14 +43,14 @@ module Fastlane
43
43
  optional: true,
44
44
  is_string: false,
45
45
  verify_block: proc do |value|
46
- raise "dark is only a flag and should always be true".red unless value == true
46
+ UI.user_error!("dark is only a flag and should always be true") unless value == true
47
47
  end),
48
48
  FastlaneCore::ConfigItem.new(key: :custom,
49
49
  env_name: "FL_BADGE_CUSTOM",
50
50
  description: "Add your custom overlay/badge image",
51
51
  optional: true,
52
52
  verify_block: proc do |value|
53
- raise "custom should be a valid file path".red unless value and File.exist?(value)
53
+ UI.user_error!("custom should be a valid file path") unless value and File.exist?(value)
54
54
  end),
55
55
  FastlaneCore::ConfigItem.new(key: :no_badge,
56
56
  env_name: "FL_BADGE_NO_BADGE",
@@ -58,7 +58,7 @@ module Fastlane
58
58
  optional: true,
59
59
  is_string: false,
60
60
  verify_block: proc do |value|
61
- raise "no_badge is only a flag and should always be true".red unless value == true
61
+ UI.user_error!("no_badge is only a flag and should always be true") unless value == true
62
62
  end),
63
63
  FastlaneCore::ConfigItem.new(key: :shield,
64
64
  env_name: "FL_BADGE_SHIELD",
@@ -71,7 +71,7 @@ module Fastlane
71
71
  optional: true,
72
72
  is_string: false,
73
73
  verify_block: proc do |value|
74
- raise "alpha is only a flag and should always be true".red unless value == true
74
+ UI.user_error!("alpha is only a flag and should always be true") unless value == true
75
75
  end),
76
76
  FastlaneCore::ConfigItem.new(key: :path,
77
77
  env_name: "FL_BADGE_PATH",
@@ -80,7 +80,7 @@ module Fastlane
80
80
  is_string: true,
81
81
  default_value: '.',
82
82
  verify_block: proc do |value|
83
- raise "path needs to be a valid directory".red if Dir[value].empty?
83
+ UI.user_error!("path needs to be a valid directory") if Dir[value].empty?
84
84
  end),
85
85
  FastlaneCore::ConfigItem.new(key: :shield_io_timeout,
86
86
  env_name: "FL_BADGE_SHIELD_IO_TIMEOUT",
@@ -88,7 +88,7 @@ module Fastlane
88
88
  optional: true,
89
89
  is_string: false,
90
90
  verify_block: proc do |value|
91
- raise "shield_io_timeout needs to be an integer > 0".red if value.to_i < 1
91
+ UI.user_error!("shield_io_timeout needs to be an integer > 0") if value.to_i < 1
92
92
  end),
93
93
  FastlaneCore::ConfigItem.new(key: :glob,
94
94
  env_name: "FL_BADGE_GLOB",
@@ -101,7 +101,7 @@ module Fastlane
101
101
  optional: true,
102
102
  is_string: false,
103
103
  verify_block: proc do |value|
104
- raise "alpha_channel is only a flag and should always be true".red unless value == true
104
+ UI.user_error!("alpha_channel is only a flag and should always be true") unless value == true
105
105
  end),
106
106
  FastlaneCore::ConfigItem.new(key: :shield_gravity,
107
107
  env_name: "FL_BADGE_SHIELD_GRAVITY",
@@ -114,7 +114,7 @@ module Fastlane
114
114
  optional: true,
115
115
  is_string: false,
116
116
  verify_block: proc do |value|
117
- raise "shield_no_resize is only a flag and should always be true".red unless value == true
117
+ UI.user_error!("shield_no_resize is only a flag and should always be true") unless value == true
118
118
  end)
119
119
  ]
120
120
  end
@@ -9,6 +9,7 @@ module Fastlane
9
9
  cmd << "--use-submodules" if params[:use_submodules]
10
10
  cmd << "--no-use-binaries" if params[:use_binaries] == false
11
11
  cmd << "--no-build" if params[:no_build] == true
12
+ cmd << "--no-skip-current" if params[:no_skip_current] == true
12
13
  cmd << "--verbose" if params[:verbose] == true
13
14
  cmd << "--platform #{params[:platform]}" if params[:platform]
14
15
 
@@ -19,14 +20,18 @@ module Fastlane
19
20
  "Runs `carthage bootstrap` or `carthage update` for your project"
20
21
  end
21
22
 
23
+ def self.available_commands
24
+ %w(build bootstrap update archive)
25
+ end
26
+
22
27
  def self.available_options
23
28
  [
24
29
  FastlaneCore::ConfigItem.new(key: :command,
25
30
  env_name: "FL_CARTHAGE_COMMAND",
26
- description: "Carthage command (one of `build`, `bootstrap`, `update`)",
31
+ description: "Carthage command (one of: #{available_commands.join(', ')})",
27
32
  default_value: 'bootstrap',
28
33
  verify_block: proc do |value|
29
- raise "Please pass a valid command. Use one of the following: build, bootstrap, update" unless %w(build bootstrap update).include? value
34
+ UI.user_error!("Please pass a valid command. Use one of the following: #{available_commands.join(', ')}") unless available_commands.include? value
30
35
  end),
31
36
  FastlaneCore::ConfigItem.new(key: :use_ssh,
32
37
  env_name: "FL_CARTHAGE_USE_SSH",
@@ -34,7 +39,7 @@ module Fastlane
34
39
  is_string: false,
35
40
  optional: true,
36
41
  verify_block: proc do |value|
37
- raise "Please pass a valid value for use_ssh. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
42
+ UI.user_error!("Please pass a valid value for use_ssh. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
38
43
  end),
39
44
  FastlaneCore::ConfigItem.new(key: :use_submodules,
40
45
  env_name: "FL_CARTHAGE_USE_SUBMODULES",
@@ -42,7 +47,7 @@ module Fastlane
42
47
  is_string: false,
43
48
  optional: true,
44
49
  verify_block: proc do |value|
45
- raise "Please pass a valid value for use_submodules. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
50
+ UI.user_error!("Please pass a valid value for use_submodules. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
46
51
  end),
47
52
  FastlaneCore::ConfigItem.new(key: :use_binaries,
48
53
  env_name: "FL_CARTHAGE_USE_BINARIES",
@@ -50,7 +55,7 @@ module Fastlane
50
55
  is_string: false,
51
56
  optional: true,
52
57
  verify_block: proc do |value|
53
- raise "Please pass a valid value for use_binaries. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
58
+ UI.user_error!("Please pass a valid value for use_binaries. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
54
59
  end),
55
60
  FastlaneCore::ConfigItem.new(key: :no_build,
56
61
  env_name: "FL_CARTHAGE_NO_BUILD",
@@ -58,7 +63,15 @@ module Fastlane
58
63
  is_string: false,
59
64
  optional: true,
60
65
  verify_block: proc do |value|
61
- raise "Please pass a valid value for no_build. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
66
+ UI.user_error!("Please pass a valid value for no_build. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
67
+ end),
68
+ FastlaneCore::ConfigItem.new(key: :no_skip_current,
69
+ env_name: "FL_CARTHAGE_NO_SKIP_CURRENT",
70
+ description: "Don't skip building the Carthage project (in addition to its dependencies)",
71
+ is_string: false,
72
+ optional: true,
73
+ verify_block: proc do |value|
74
+ UI.user_error!("Please pass a valid value for no_skip_current. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
62
75
  end),
63
76
  FastlaneCore::ConfigItem.new(key: :verbose,
64
77
  env_name: "FL_CARTHAGE_VERBOSE",
@@ -66,14 +79,14 @@ module Fastlane
66
79
  is_string: false,
67
80
  optional: true,
68
81
  verify_block: proc do |value|
69
- raise "Please pass a valid value for verbose. Use one of the following: true, false" unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
82
+ UI.user_error!("Please pass a valid value for verbose. Use one of the following: true, false") unless value.kind_of?(TrueClass) || value.kind_of?(FalseClass)
70
83
  end),
71
84
  FastlaneCore::ConfigItem.new(key: :platform,
72
85
  env_name: "FL_CARTHAGE_PLATFORM",
73
86
  description: "Define which platform to build for",
74
87
  optional: true,
75
88
  verify_block: proc do |value|
76
- raise "Please pass a valid platform. Use one of the following: all, iOS, Mac, watchOS" unless ["all", "iOS", "Mac", "watchOS"].include? value
89
+ UI.user_error!("Please pass a valid platform. Use one of the following: all, iOS, Mac, watchOS") unless ["all", "iOS", "Mac", "watchOS"].include? value
77
90
  end)
78
91
  ]
79
92
  end
@@ -83,7 +96,7 @@ module Fastlane
83
96
  end
84
97
 
85
98
  def self.authors
86
- ["bassrock", "petester42", "jschmid", "JaviSoto", "uny"]
99
+ ["bassrock", "petester42", "jschmid", "JaviSoto", "uny", "phatblat"]
87
100
  end
88
101
  end
89
102
  end