fastlane 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fastlane +16 -16
  3. data/lib/assets/custom_action_template.rb +2 -2
  4. data/lib/fastlane.rb +1 -0
  5. data/lib/fastlane/action.rb +5 -6
  6. data/lib/fastlane/action_collector.rb +6 -6
  7. data/lib/fastlane/actions/actions_helper.rb +12 -74
  8. data/lib/fastlane/actions/add_git_tag.rb +2 -2
  9. data/lib/fastlane/actions/appstore.rb +2 -2
  10. data/lib/fastlane/actions/backup_file.rb +2 -2
  11. data/lib/fastlane/actions/backup_xcarchive.rb +11 -12
  12. data/lib/fastlane/actions/bundle_install.rb +5 -1
  13. data/lib/fastlane/actions/chatwork.rb +12 -12
  14. data/lib/fastlane/actions/clean_build_artifacts.rb +4 -6
  15. data/lib/fastlane/actions/clipboard.rb +1 -1
  16. data/lib/fastlane/actions/commit_version_bump.rb +35 -10
  17. data/lib/fastlane/actions/crashlytics.rb +26 -26
  18. data/lib/fastlane/actions/create_keychain.rb +6 -6
  19. data/lib/fastlane/actions/default_platform.rb +1 -1
  20. data/lib/fastlane/actions/delete_keychain.rb +3 -3
  21. data/lib/fastlane/actions/deliver.rb +3 -3
  22. data/lib/fastlane/actions/deploygate.rb +19 -18
  23. data/lib/fastlane/actions/dsym_zip.rb +7 -9
  24. data/lib/fastlane/actions/ensure_git_branch.rb +2 -3
  25. data/lib/fastlane/actions/ensure_no_debug_code.rb +8 -8
  26. data/lib/fastlane/actions/fastlane_version.rb +4 -2
  27. data/lib/fastlane/actions/frameit.rb +7 -7
  28. data/lib/fastlane/actions/gcovr.rb +5 -4
  29. data/lib/fastlane/actions/get_build_number.rb +27 -30
  30. data/lib/fastlane/actions/get_github_release.rb +11 -11
  31. data/lib/fastlane/actions/get_version_number.rb +28 -30
  32. data/lib/fastlane/actions/git_branch.rb +1 -2
  33. data/lib/fastlane/actions/gym.rb +2 -2
  34. data/lib/fastlane/actions/hg_commit_version_bump.rb +28 -6
  35. data/lib/fastlane/actions/hg_push.rb +0 -1
  36. data/lib/fastlane/actions/hipchat.rb +20 -20
  37. data/lib/fastlane/actions/hockey.rb +16 -17
  38. data/lib/fastlane/actions/import.rb +1 -2
  39. data/lib/fastlane/actions/import_certificate.rb +1 -1
  40. data/lib/fastlane/actions/import_from_git.rb +6 -2
  41. data/lib/fastlane/actions/increment_build_number.rb +25 -28
  42. data/lib/fastlane/actions/increment_version_number.rb +55 -57
  43. data/lib/fastlane/actions/install_carthage.rb +10 -11
  44. data/lib/fastlane/actions/install_cocoapods.rb +3 -3
  45. data/lib/fastlane/actions/ipa.rb +8 -6
  46. data/lib/fastlane/actions/is_ci.rb +37 -0
  47. data/lib/fastlane/actions/lane_context.rb +2 -2
  48. data/lib/fastlane/actions/last_git_tag.rb +1 -1
  49. data/lib/fastlane/actions/lcov.rb +28 -31
  50. data/lib/fastlane/actions/mailgun.rb +11 -42
  51. data/lib/fastlane/actions/oclint.rb +10 -13
  52. data/lib/fastlane/actions/pem.rb +2 -2
  53. data/lib/fastlane/actions/pilot.rb +4 -2
  54. data/lib/fastlane/actions/prompt.rb +6 -6
  55. data/lib/fastlane/actions/push_git_tags.rb +38 -0
  56. data/lib/fastlane/actions/push_to_git_remote.rb +4 -1
  57. data/lib/fastlane/actions/puts.rb +1 -1
  58. data/lib/fastlane/actions/register_devices.rb +4 -3
  59. data/lib/fastlane/actions/reset_git_repo.rb +6 -6
  60. data/lib/fastlane/actions/resign.rb +4 -5
  61. data/lib/fastlane/actions/restore_file.rb +2 -2
  62. data/lib/fastlane/actions/s3.rb +19 -22
  63. data/lib/fastlane/actions/set_build_number_repository.rb +26 -36
  64. data/lib/fastlane/actions/set_changelog.rb +4 -4
  65. data/lib/fastlane/actions/set_github_release.rb +10 -11
  66. data/lib/fastlane/actions/sigh.rb +1 -1
  67. data/lib/fastlane/actions/slack.rb +85 -74
  68. data/lib/fastlane/actions/snapshot.rb +2 -2
  69. data/lib/fastlane/actions/team_id.rb +2 -1
  70. data/lib/fastlane/actions/team_name.rb +2 -1
  71. data/lib/fastlane/actions/testflight.rb +2 -2
  72. data/lib/fastlane/actions/testmunk.rb +16 -16
  73. data/lib/fastlane/actions/typetalk.rb +14 -14
  74. data/lib/fastlane/actions/update_app_group_identifiers.rb +17 -17
  75. data/lib/fastlane/actions/update_fastlane.rb +16 -14
  76. data/lib/fastlane/actions/update_info_plist.rb +14 -16
  77. data/lib/fastlane/actions/update_project_code_signing.rb +3 -3
  78. data/lib/fastlane/actions/update_project_provisioning.rb +48 -36
  79. data/lib/fastlane/actions/xcode_select.rb +4 -3
  80. data/lib/fastlane/actions/xcode_server_get_assets.rb +23 -24
  81. data/lib/fastlane/actions/xcodebuild.rb +13 -13
  82. data/lib/fastlane/actions/xctool.rb +2 -2
  83. data/lib/fastlane/actions_list.rb +27 -29
  84. data/lib/fastlane/command_line_handler.rb +13 -14
  85. data/lib/fastlane/configuration_helper.rb +18 -20
  86. data/lib/fastlane/core_ext/string.rb +2 -2
  87. data/lib/fastlane/docs_generator.rb +33 -32
  88. data/lib/fastlane/erb_template_helper.rb +1 -1
  89. data/lib/fastlane/fast_file.rb +27 -18
  90. data/lib/fastlane/fastlane_folder.rb +1 -1
  91. data/lib/fastlane/helper/git_helper.rb +27 -0
  92. data/lib/fastlane/helper/sh_helper.rb +48 -0
  93. data/lib/fastlane/junit_generator.rb +1 -1
  94. data/lib/fastlane/lane.rb +6 -6
  95. data/lib/fastlane/lane_list.rb +12 -13
  96. data/lib/fastlane/lane_manager.rb +17 -11
  97. data/lib/fastlane/new_action.rb +1 -1
  98. data/lib/fastlane/runner.rb +23 -24
  99. data/lib/fastlane/setup.rb +16 -17
  100. data/lib/fastlane/supported_platforms.rb +2 -2
  101. data/lib/fastlane/version.rb +1 -1
  102. metadata +16 -12
@@ -0,0 +1,38 @@
1
+ module Fastlane
2
+ module Actions
3
+ class PushGitTagsAction < Action
4
+ def self.run(params)
5
+ command = [
6
+ 'git',
7
+ 'push',
8
+ '--tags'
9
+ ]
10
+
11
+ result = Actions.sh(command.join(' '))
12
+ Helper.log.info 'Tags pushed to remote'.green
13
+ result
14
+ end
15
+
16
+ #####################################################
17
+ # @!group Documentation
18
+ #####################################################
19
+
20
+ def self.description
21
+ "Push local tags to the remote - this will only push tags"
22
+ end
23
+
24
+ def self.available_options
25
+ [
26
+ ]
27
+ end
28
+
29
+ def self.author
30
+ ['vittoriom']
31
+ end
32
+
33
+ def self.is_supported?(platform)
34
+ true
35
+ end
36
+ end
37
+ end
38
+ end
@@ -3,7 +3,10 @@ module Fastlane
3
3
  # Adds a git tag to the current commit
4
4
  class PushToGitRemoteAction < Action
5
5
  def self.run(params)
6
- local_branch = params[:local_branch] || (Actions.git_branch.gsub(/#{params[:remote]}\//, '') rescue nil) || 'master'
6
+ local_branch = params[:local_branch]
7
+ local_branch ||= Actions.git_branch.gsub(%r{#{params[:remote]}\/}, '') if Actions.git_branch
8
+ local_branch ||= 'master'
9
+
7
10
  remote_branch = params[:remote_branch] || local_branch
8
11
 
9
12
  # construct our command as an array of components
@@ -27,4 +27,4 @@ module Fastlane
27
27
  end
28
28
  end
29
29
  end
30
- end
30
+ end
@@ -45,6 +45,7 @@ module Fastlane
45
45
  end
46
46
 
47
47
  Helper.log.info "Successfully registered new devices.".green
48
+ return device_objs
48
49
  end
49
50
 
50
51
  def self.description
@@ -62,8 +63,8 @@ module Fastlane
62
63
  env_name: "FL_REGISTER_DEVICES_FILE",
63
64
  description: "Provide a path to the devices to register",
64
65
  optional: true,
65
- verify_block: Proc.new do |value|
66
- raise "Could not find file '#{value}'".red unless File.exists?(value)
66
+ verify_block: proc do |value|
67
+ raise "Could not find file '#{value}'".red unless File.exist?(value)
67
68
  end),
68
69
  FastlaneCore::ConfigItem.new(key: :team_id,
69
70
  env_name: "FASTLANE_TEAM_ID",
@@ -72,7 +73,7 @@ module Fastlane
72
73
  FastlaneCore::ConfigItem.new(key: :username,
73
74
  env_name: "DELIVER_USER",
74
75
  description: "Optional: Your Apple ID",
75
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)),
76
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:apple_id))
76
77
  ]
77
78
  end
78
79
 
@@ -4,17 +4,17 @@ module Fastlane
4
4
  class ResetGitRepoAction < Action
5
5
  def self.run(params)
6
6
  if params[:force] || params[:force] || Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START]
7
- paths = (params[:files] rescue nil)
7
+ paths = params[:files]
8
8
 
9
9
  return paths if Helper.is_test?
10
-
10
+
11
11
  if (paths || []).count == 0
12
12
  Actions.sh('git reset --hard HEAD')
13
13
  Actions.sh('git clean -qfdx')
14
14
  Helper.log.info 'Git repo was reset and cleaned back to a pristine state.'.green
15
15
  else
16
16
  paths.each do |path|
17
- Helper.log.warn("Couldn't find file at path '#{path}'") unless File.exists?(path)
17
+ Helper.log.warn("Couldn't find file at path '#{path}'") unless File.exist?(path)
18
18
  Actions.sh("git checkout -- '#{path}'")
19
19
  end
20
20
  Helper.log.info "Git cleaned up #{paths.count} files.".green
@@ -43,14 +43,14 @@ module Fastlane
43
43
  description: "Array of files the changes should be discarded from. If not given, all files will be discarded",
44
44
  optional: true,
45
45
  is_string: false,
46
- verify_block: Proc.new do |value|
47
- raise "Please pass an array only" unless value.kind_of?Array
46
+ verify_block: proc do |value|
47
+ raise "Please pass an array only" unless value.kind_of? Array
48
48
  end),
49
49
  FastlaneCore::ConfigItem.new(key: :force,
50
50
  env_name: "FL_RESET_GIT_FORCE",
51
51
  description: "Skip verifying of previously clean state of repo. Only recommended in combination with `files` option",
52
52
  is_string: false,
53
- default_value: false),
53
+ default_value: false)
54
54
  ]
55
55
  end
56
56
 
@@ -5,7 +5,6 @@ module Fastlane
5
5
  def self.run(params)
6
6
  require 'sigh'
7
7
 
8
-
9
8
  # try to resign the ipa
10
9
  if Sigh::Resign.resign(params[:ipa], params[:signing_identity], params[:provisioning_profile])
11
10
  Helper.log.info 'Successfully re-signed .ipa 🔏.'.green
@@ -24,8 +23,8 @@ module Fastlane
24
23
  env_name: "FL_RESIGN_IPA",
25
24
  description: "Path to the ipa file to resign. Optional if you use the `ipa` or `xcodebuild` action",
26
25
  default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
27
- verify_block: Proc.new do |value|
28
- raise "Couldn't find ipa file at path '#{value}'".red unless File.exists?(value)
26
+ verify_block: proc do |value|
27
+ raise "Couldn't find ipa file at path '#{value}'".red unless File.exist?(value)
29
28
  end),
30
29
  FastlaneCore::ConfigItem.new(key: :signing_identity,
31
30
  env_name: "FL_RESIGN_SIGNING_IDENTITY",
@@ -34,8 +33,8 @@ module Fastlane
34
33
  env_name: "FL_RESIGN_PROVISIONING_PROFILE",
35
34
  description: "Path to your provisioning_profile. Optional if you use `sigh`",
36
35
  default_value: Actions.lane_context[SharedValues::SIGH_PROFILE_PATH],
37
- verify_block: Proc.new do |value|
38
- raise "No provisioning_profile file given or found, pass using `provisioning_profile: 'path/app.mobileprovision'`".red unless File.exists?(value)
36
+ verify_block: proc do |value|
37
+ raise "No provisioning_profile file given or found, pass using `provisioning_profile: 'path/app.mobileprovision'`".red unless File.exist?(value)
39
38
  end)
40
39
  ]
41
40
  end
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class RestoreFileAction < Action
4
- def self.run params
4
+ def self.run(params)
5
5
  path = params[:path]
6
6
  backup_path = "#{path}.back"
7
7
  raise "Could not find file '#{backup_path}'" unless File.exist? backup_path
@@ -26,7 +26,7 @@ module Fastlane
26
26
  [
27
27
  FastlaneCore::ConfigItem.new(key: :path,
28
28
  description: "Original file name you want to restore",
29
- optional: false),
29
+ optional: false)
30
30
  ]
31
31
  end
32
32
  end
@@ -1,10 +1,11 @@
1
+ # rubocop:disable Metrics/PerceivedComplexity
2
+ # rubocop:disable Metrics/AbcSize
1
3
  require 'fastlane/erb_template_helper'
2
4
  require 'ostruct'
3
5
  require 'shenzhen'
4
6
 
5
7
  module Fastlane
6
8
  module Actions
7
-
8
9
  module SharedValues
9
10
  S3_IPA_OUTPUT_PATH = :S3_IPA_OUTPUT_PATH
10
11
  S3_DSYM_OUTPUT_PATH = :S3_DSYM_OUTPUT_PATH
@@ -22,12 +23,11 @@ module Fastlane
22
23
  region: '-r',
23
24
  acl: '--acl',
24
25
  source: '--source-dir',
25
- path: '-P',
26
+ path: '-P'
26
27
  }
27
28
 
28
29
  class S3Action < Action
29
30
  def self.run(config)
30
-
31
31
  # Calling fetch on config so that default values will be used
32
32
  params = {}
33
33
  params[:ipa] = config[:ipa]
@@ -113,21 +113,19 @@ module Fastlane
113
113
  plist_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{plist_file_name}"
114
114
 
115
115
  html_file_name ||= "index.html"
116
- html_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{html_file_name}"
117
116
 
118
117
  version_file_name ||= "version.json"
119
- version_url = "https://#{s3_subdomain}.amazonaws.com/#{s3_bucket}/#{version_file_name}"
120
118
 
121
- #grabs module
119
+ # grabs module
122
120
  eth = Fastlane::ErbTemplateHelper
123
121
 
124
122
  # Creates plist from template
125
- if plist_template_path && File.exists?(plist_template_path)
123
+ if plist_template_path && File.exist?(plist_template_path)
126
124
  plist_template = eth.load_from_path(plist_template_path)
127
125
  else
128
126
  plist_template = eth.load("s3_plist_template")
129
127
  end
130
- plist_render = eth.render(plist_template,{
128
+ plist_render = eth.render(plist_template, {
131
129
  url: ipa_url,
132
130
  bundle_id: bundle_id,
133
131
  bundle_version: bundle_version,
@@ -135,12 +133,12 @@ module Fastlane
135
133
  })
136
134
 
137
135
  # Creates html from template
138
- if html_template_path && File.exists?(html_template_path)
136
+ if html_template_path && File.exist?(html_template_path)
139
137
  html_template = eth.load_from_path(html_template_path)
140
138
  else
141
139
  html_template = eth.load("s3_html_template")
142
140
  end
143
- html_render = eth.render(html_template,{
141
+ html_render = eth.render(html_template, {
144
142
  url: plist_url,
145
143
  bundle_id: bundle_id,
146
144
  bundle_version: bundle_version,
@@ -148,12 +146,12 @@ module Fastlane
148
146
  })
149
147
 
150
148
  # Creates version from template
151
- if version_template_path && File.exists?(version_template_path)
149
+ if version_template_path && File.exist?(version_template_path)
152
150
  version_template = eth.load_from_path(version_template_path)
153
151
  else
154
152
  version_template = eth.load("s3_version_template")
155
153
  end
156
- version_render = eth.render(version_template,{
154
+ version_render = eth.render(version_template, {
157
155
  url: plist_url,
158
156
  full_version: full_version
159
157
  })
@@ -174,10 +172,9 @@ module Fastlane
174
172
  html_render,
175
173
  version_file_name,
176
174
  version_render
177
- )
175
+ )
178
176
 
179
177
  return true
180
-
181
178
  end
182
179
 
183
180
  def self.params_to_build_args(params)
@@ -185,9 +182,9 @@ module Fastlane
185
182
  params = params.delete_if { |k, v| (k != :clean && k != :archive ) && v.nil? }
186
183
 
187
184
  # Maps nice developer param names to Shenzhen's `ipa build` arguments
188
- params.collect do |k,v|
185
+ params.collect do |k, v|
189
186
  v ||= ''
190
- if args = S3_ARGS_MAP[k]
187
+ if S3_ARGS_MAP[k]
191
188
  value = (v.to_s.length > 0 ? "\"#{v}\"" : "")
192
189
  "#{S3_ARGS_MAP[k]} #{value}".strip
193
190
  end
@@ -197,8 +194,8 @@ module Fastlane
197
194
  def self.upload_plist_and_html_to_s3(s3_access_key, s3_secret_access_key, s3_bucket, plist_file_name, plist_render, html_file_name, html_render, version_file_name, version_render)
198
195
  require 'aws-sdk'
199
196
  s3_client = AWS::S3.new(
200
- access_key_id: s3_access_key,
201
- secret_access_key: s3_secret_access_key
197
+ access_key_id: s3_access_key,
198
+ secret_access_key: s3_secret_access_key
202
199
  )
203
200
  bucket = s3_client.buckets[s3_bucket]
204
201
 
@@ -216,7 +213,7 @@ module Fastlane
216
213
  Actions.lane_context[SharedValues::S3_VERSION_OUTPUT_PATH] = version_obj.public_url.to_s
217
214
  ENV[SharedValues::S3_VERSION_OUTPUT_PATH.to_s] = version_obj.public_url.to_s
218
215
 
219
- Helper.log.info "Successfully uploaded ipa file to '#{html_obj.public_url.to_s}'".green
216
+ Helper.log.info "Successfully uploaded ipa file to '#{html_obj.public_url}'".green
220
217
  end
221
218
 
222
219
  #
@@ -251,7 +248,6 @@ module Fastlane
251
248
  def self.get_ipa_info(ipa_file)
252
249
  bundle_id, bundle_version, title, full_version = nil
253
250
  Dir.mktmpdir do |dir|
254
-
255
251
  system "unzip -q #{ipa_file} -d #{dir} 2> /dev/null"
256
252
  plist = Dir["#{dir}/**/*.app/Info.plist"].last
257
253
 
@@ -261,7 +257,6 @@ module Fastlane
261
257
 
262
258
  # This is the string: {CFBundleShortVersionString}.{CFBundleVersion}
263
259
  full_version = bundle_version + '.' + Shenzhen::PlistBuddy.print(plist, 'CFBundleVersion')
264
-
265
260
  end
266
261
  return bundle_id, bundle_version, title, full_version
267
262
  end
@@ -339,7 +334,7 @@ module Fastlane
339
334
  FastlaneCore::ConfigItem.new(key: :acl,
340
335
  env_name: "S3_ACL",
341
336
  description: "Uploaded object permissions e.g public_read (default), private, public_read_write, authenticated_read ",
342
- optional: true,),
337
+ optional: true)
343
338
  ]
344
339
  end
345
340
 
@@ -363,3 +358,5 @@ module Fastlane
363
358
  end
364
359
  end
365
360
  end
361
+ # rubocop:enable Metrics/PerceivedComplexity
362
+ # rubocop:enable Metrics/AbcSize
@@ -9,53 +9,43 @@ module Fastlane
9
9
  end
10
10
 
11
11
  def self.is_svn?
12
- begin
13
- Actions.sh 'svn info'
14
- return true
15
- rescue
16
- return false
17
- end
12
+ Actions.sh 'svn info'
13
+ return true
14
+ rescue
15
+ return false
18
16
  end
19
17
 
20
18
  def self.is_git?
21
- begin
22
- Actions.sh 'git rev-parse HEAD'
23
- return true
24
- rescue
25
- return false
26
- end
19
+ Actions.sh 'git rev-parse HEAD'
20
+ return true
21
+ rescue
22
+ return false
27
23
  end
28
24
 
29
25
  def self.is_git_svn?
30
- begin
31
- Actions.sh 'git svn info'
32
- return true
33
- rescue
34
- return false
35
- end
26
+ Actions.sh 'git svn info'
27
+ return true
28
+ rescue
29
+ return false
36
30
  end
37
31
 
38
32
  def self.run(params)
39
- begin
40
-
41
- if is_svn?
42
- Helper.log.info "Detected repo: svn"
43
- command = 'svn info | grep Revision | egrep -o "[0-9]+"'
44
- elsif is_git_svn?
45
- Helper.log.info "Detected repo: git-svn"
46
- command = 'git svn info | grep Revision | egrep -o "[0-9]+"'
47
- elsif is_git?
48
- Helper.log.info "Detected repo: git"
49
- command = 'git rev-parse --short HEAD'
50
- else
51
- raise "No repository detected"
52
- end
53
-
54
- build_number = Actions.sh command
33
+ if is_svn?
34
+ Helper.log.info "Detected repo: svn"
35
+ command = 'svn info | grep Revision | egrep -o "[0-9]+"'
36
+ elsif is_git_svn?
37
+ Helper.log.info "Detected repo: git-svn"
38
+ command = 'git svn info | grep Revision | egrep -o "[0-9]+"'
39
+ elsif is_git?
40
+ Helper.log.info "Detected repo: git"
41
+ command = 'git rev-parse --short HEAD'
42
+ else
43
+ raise "No repository detected"
44
+ end
55
45
 
56
- Fastlane::Actions::IncrementBuildNumberAction.run(build_number:build_number)
46
+ build_number = Actions.sh command
57
47
 
58
- end
48
+ Fastlane::Actions::IncrementBuildNumberAction.run(build_number: build_number)
59
49
  end
60
50
 
61
51
  #####################################################
@@ -25,7 +25,7 @@ module Fastlane
25
25
  unless changelog
26
26
  path = "./fastlane/changelog.txt"
27
27
  Helper.log.info "Looking for changelog in '#{path}'..."
28
- if File.exists?path
28
+ if File.exist? path
29
29
  changelog = File.read(path)
30
30
  else
31
31
  Helper.log.error "Couldn't find changelog.txt"
@@ -85,7 +85,7 @@ module Fastlane
85
85
  env_name: "FASTLANE_USERNAME",
86
86
  description: "Your Apple ID Username",
87
87
  default_value: ENV["DELIVER_USER"] || CredentialsManager::AppfileConfig.try_fetch_value(:apple_id),
88
- verify_block: Proc.new do |value|
88
+ verify_block: proc do |value|
89
89
  CredentialsManager::PasswordManager.shared_manager(value)
90
90
  end),
91
91
  FastlaneCore::ConfigItem.new(key: :version,
@@ -104,8 +104,8 @@ module Fastlane
104
104
  end
105
105
 
106
106
  def self.is_supported?(platform)
107
- [:ios, :mac].include?platform
107
+ [:ios, :mac].include? platform
108
108
  end
109
109
  end
110
110
  end
111
- end
111
+ end
@@ -8,7 +8,6 @@ module Fastlane
8
8
 
9
9
  class SetGithubReleaseAction < Action
10
10
  def self.run(params)
11
-
12
11
  Helper.log.info "Creating release of #{params[:repository_name]} on tag \"#{params[:tag_name]}\" with name \"#{params[:name]}\".".yellow
13
12
 
14
13
  require 'json'
@@ -25,10 +24,10 @@ module Fastlane
25
24
  require 'base64'
26
25
  headers = { 'User-Agent' => 'fastlane-set_github_release' }
27
26
  headers['Authorization'] = "Basic #{Base64.strict_encode64(params[:api_token])}" if params[:api_token]
28
- response = Excon.post("https://api.github.com/repos/#{params[:repository_name]}/releases",
29
- :headers => headers,
30
- :body => body
31
- )
27
+ response = Excon.post("https://api.github.com/repos/#{params[:repository_name]}/releases",
28
+ headers: headers,
29
+ body: body
30
+ )
32
31
 
33
32
  case response[:status]
34
33
  when 201
@@ -64,10 +63,10 @@ module Fastlane
64
63
  end
65
64
 
66
65
  def self.details
67
- "Creates a new release on GitHub. You must provide your GitHub Personal token
66
+ "Creates a new release on GitHub. You must provide your GitHub Personal token
68
67
  (get one from https://github.com/settings/tokens/new), the repository name
69
68
  and tag name. If the tag doesn't exist, one will be created on the commit or branch passed-in as
70
- commitish. Out parameters provide the release's id, which can be used for later editing and the
69
+ commitish. Out parameters provide the release's id, which can be used for later editing and the
71
70
  release html link to GitHub."
72
71
  end
73
72
 
@@ -76,9 +75,9 @@ module Fastlane
76
75
  FastlaneCore::ConfigItem.new(key: :repository_name,
77
76
  env_name: "FL_SET_GITHUB_RELEASE_REPOSITORY_NAME",
78
77
  description: "The path to your repo, e.g. 'KrauseFx/fastlane'",
79
- verify_block: Proc.new do |value|
80
- raise "Please only pass the path, e.g. 'KrauseFx/fastlane'".red if value.include?"github.com"
81
- raise "Please only pass the path, e.g. 'KrauseFx/fastlane'".red if value.split('/').count != 2
78
+ verify_block: proc do |value|
79
+ raise "Please only pass the path, e.g. 'KrauseFx/fastlane'".red if value.include? "github.com"
80
+ raise "Please only pass the path, e.g. 'KrauseFx/fastlane'".red if value.split('/').count != 2
82
81
  end),
83
82
  FastlaneCore::ConfigItem.new(key: :api_token,
84
83
  env_name: "FL_GITHUB_RELEASE_API_TOKEN",
@@ -137,4 +136,4 @@ module Fastlane
137
136
  end
138
137
  end
139
138
  end
140
- end
139
+ end