fastlane 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 913ddd5a293edd301b1fb0bd00a25ce696c269ae
4
- data.tar.gz: 59515f32a74f1904fb5924641f9de68bb57e78ac
3
+ metadata.gz: a3688edd276635af01ff6dbde0e3ec6786ab5536
4
+ data.tar.gz: ad234477739a849996fff29f8a193095fae7eea3
5
5
  SHA512:
6
- metadata.gz: 8f53818436dc2576d69b8ee534456000f0e4ac0223f03e29656c519805fc11d928d72e410586fdb26380e08a7417627e44d03513277fe3e443f5c0deefc649a5
7
- data.tar.gz: 4dbdc3c618022ac5348f60eb2d322db087db3acae0744ccbf24dce927514ca00caddd0ef367958ac39a1ddca470b32dcf9c256c64060fb540916d435ae01af69
6
+ metadata.gz: 99d5d48ba2a9107b87dcfcd571b3ec0a4580976685c0a45ecbed9039fde34840aaa90e13590e2fa0f619576088f350995f1f440d40b116fee916bde2bbad31d7
7
+ data.tar.gz: e0941d32fdbf8236d06098f8672fb073260e85adad502adc52a8a505260cfc38795d3e712700c3e01b5f65cc75c17f8283a54d2e8771d373d2e45138cab25ee7
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # rubocop:disable Metrics/AbcSize
2
3
 
3
4
  $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
4
5
 
@@ -22,17 +23,15 @@ class FastlaneApplication
22
23
  program :help, 'GitHub', 'https://github.com/krausefx/fastlane'
23
24
  program :help_formatter, :compact
24
25
 
25
- always_trace!
26
-
27
26
  command :run do |c|
28
27
  c.syntax = 'fastlane run [lane]'
29
28
  c.description = 'Drive the fastlane for a specific environment. Pass the lane name and optionally the platform first'
30
29
  c.option '--env STRING', String, 'Add environment to use with `dotenv`'
31
30
 
32
- c.action do |args, _options|
31
+ c.action do |args, options|
33
32
  if Fastlane::FastlaneFolder.path
34
33
 
35
- Fastlane::CommandLineHandler.handle(args, _options)
34
+ Fastlane::CommandLineHandler.handle(args, options)
36
35
  else
37
36
  create = agree('Could not find fastlane in current directory. Would you like to set it up? (y/n)'.yellow, true)
38
37
  Fastlane::Setup.new.run if create
@@ -44,7 +43,7 @@ class FastlaneApplication
44
43
  c.syntax = 'fastlane init'
45
44
  c.description = 'Helps you setting up fastlane based on your existing tools.'
46
45
 
47
- c.action do |_args, _options|
46
+ c.action do |args, options|
48
47
  Fastlane::Setup.new.run
49
48
  end
50
49
  end
@@ -53,7 +52,7 @@ class FastlaneApplication
53
52
  c.syntax = 'fastlane new_action'
54
53
  c.description = 'Create a new custom action for fastlane.'
55
54
 
56
- c.action do |_args, _options|
55
+ c.action do |args, options|
57
56
  Fastlane::NewAction.run
58
57
  end
59
58
  end
@@ -62,7 +61,7 @@ class FastlaneApplication
62
61
  c.syntax = 'fastlane lanes'
63
62
  c.description = 'Lists all available lanes and shows their description'
64
63
 
65
- c.action do |_args, _options|
64
+ c.action do |args, options|
66
65
  require 'fastlane/lane_list'
67
66
  path = File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile')
68
67
  Fastlane::LaneList.output(path)
@@ -72,7 +71,7 @@ class FastlaneApplication
72
71
  command :list do |c|
73
72
  c.syntax = 'fastlane list'
74
73
  c.description = 'Lists all available lanes without description'
75
- c.action do |_args, _options|
74
+ c.action do |args, options|
76
75
  ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
77
76
  puts "\nAvailable lanes:".green
78
77
  ff.runner.available_lanes.each do |lane|
@@ -87,10 +86,10 @@ class FastlaneApplication
87
86
  c.description = 'Generate a markdown based documentation based on the Fastfile'
88
87
  c.option '-f', '--force', 'Overwrite the existing README.md in the ./fastlane folder'
89
88
 
90
- c.action do |_args, _options|
89
+ c.action do |args, options|
91
90
  path = File.join(Fastlane::FastlaneFolder.path || '.', 'README.md')
92
- if File.exists?path and not _options.force
93
- return unless agree('Found existing ./fastlane/README.md. Do you want to overwrite it? (y/n)', true)
91
+ if File.exist? path and !options.force
92
+ return nil unless agree('Found existing ./fastlane/README.md. Do you want to overwrite it? (y/n)', true)
94
93
  end
95
94
 
96
95
  ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
@@ -104,18 +103,18 @@ class FastlaneApplication
104
103
  c.syntax = 'fastlane actions'
105
104
  c.description = 'Lists all available fastlane actions'
106
105
 
107
- c.action do |_args, _options|
106
+ c.action do |args, options|
108
107
  require 'fastlane/actions_list'
109
- Fastlane::ActionsList.run(_args.first)
108
+ Fastlane::ActionsList.run(args.first)
110
109
  end
111
110
  end
112
111
 
113
112
  command :action do |c|
114
113
  c.syntax = 'fastlane action [tool_name]'
115
114
  c.description = 'Shows more information for a specific command'
116
- c.action do |_args, _options|
115
+ c.action do |args, options|
117
116
  require 'fastlane/actions_list'
118
- Fastlane::ActionsList.run(_args.first)
117
+ Fastlane::ActionsList.run(args.first)
119
118
  end
120
119
  end
121
120
 
@@ -130,4 +129,5 @@ begin
130
129
  FastlaneApplication.new.run
131
130
  ensure
132
131
  FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
133
- end
132
+ end
133
+ # rubocop:enable Metrics/AbcSize
@@ -44,7 +44,7 @@ module Fastlane
44
44
  FastlaneCore::ConfigItem.new(key: :api_token,
45
45
  env_name: "FL_[[NAME_UP]]_API_TOKEN", # The name of the environment variable
46
46
  description: "API Token for [[NAME_CLASS]]", # a short description of this parameter
47
- verify_block: Proc.new do |value|
47
+ verify_block: proc do |value|
48
48
  raise "No API token for [[NAME_CLASS]] given, pass using `api_token: 'token'`".red unless (value and not value.empty?)
49
49
  end),
50
50
  FastlaneCore::ConfigItem.new(key: :development,
@@ -75,7 +75,7 @@ module Fastlane
75
75
  #
76
76
  # platform == :ios
77
77
  #
78
- # [:ios, :mac].include?platform
78
+ # [:ios, :mac].include? platform
79
79
  #
80
80
 
81
81
  platform == :ios
@@ -21,6 +21,7 @@ module Fastlane
21
21
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
22
22
 
23
23
  Fastlane::Actions.load_default_actions
24
+ Fastlane::Actions.load_helpers
24
25
 
25
26
  if Fastlane::FastlaneFolder.path
26
27
  actions_path = File.join(Fastlane::FastlaneFolder.path, 'actions')
@@ -3,7 +3,6 @@ require 'fastlane/actions/actions_helper'
3
3
  module Fastlane
4
4
  class Action
5
5
  def self.run(params)
6
-
7
6
  end
8
7
 
9
8
  # Implement in subclasses
@@ -44,11 +43,11 @@ module Fastlane
44
43
  def self.is_supported?(platform)
45
44
  # you can do things like
46
45
  # true
47
- #
46
+ #
48
47
  # platform == :ios
49
- #
50
- # [:ios, :android].include?platform
51
- #
48
+ #
49
+ # [:ios, :android].include? platform
50
+ #
52
51
  raise "Implementing `is_supported?` for all actions is mandatory. Please update #{self}".red
53
52
  end
54
53
 
@@ -68,4 +67,4 @@ module Fastlane
68
67
  self.name.split('::').last.gsub('Action', '').fastlane_underscore
69
68
  end
70
69
  end
71
- end
70
+ end
@@ -32,9 +32,9 @@ module Fastlane
32
32
  require 'excon'
33
33
  url = HOST_URL + '/did_launch?'
34
34
  url += URI.encode_www_form(
35
- steps: launches.to_json,
36
- error: @error
37
- )
35
+ steps: launches.to_json,
36
+ error: @error
37
+ )
38
38
 
39
39
  unless Helper.is_test? # don't send test data
40
40
  fork do
@@ -57,15 +57,15 @@ module Fastlane
57
57
 
58
58
  def is_official?(name)
59
59
  return true if name == :lane_switch
60
- Actions.get_all_official_actions.include?name
60
+ Actions.get_all_official_actions.include? name
61
61
  end
62
62
 
63
63
  def did_show_message?
64
64
  path = File.join(File.expand_path('~'), '.did_show_opt_info')
65
65
 
66
- did_show = File.exists?path
66
+ did_show = File.exist? path
67
67
  File.write(path, '1')
68
68
  did_show
69
69
  end
70
70
  end
71
- end
71
+ end
@@ -8,31 +8,6 @@ module Fastlane
8
8
  ENVIRONMENT = :ENVIRONMENT
9
9
  end
10
10
 
11
- # Helper Methods
12
- def self.git_author
13
- s = `git log --name-status HEAD^..HEAD`
14
- s = s.match(/Author:.*<(.*)>/)[1]
15
- return s if s.to_s.length > 0
16
- return nil
17
- rescue
18
- return nil
19
- end
20
-
21
- def self.last_git_commit
22
- s = `git log -1 --pretty=%B`.strip
23
- return s if s.to_s.length > 0
24
- nil
25
- end
26
-
27
- # Returns the current git branch - can be replaced using the environment variable `GIT_BRANCH`
28
- def self.git_branch
29
- return ENV['GIT_BRANCH'] if ENV['GIT_BRANCH'].to_s.length > 0 # set by Jenkins
30
- s = `git rev-parse --abbrev-ref HEAD`
31
- return s.to_s.strip if s.to_s.length > 0
32
- nil
33
- end
34
-
35
-
36
11
  def self.executed_actions
37
12
  @executed_actions ||= []
38
13
  end
@@ -79,60 +54,24 @@ module Fastlane
79
54
  raise exc if exc
80
55
  end
81
56
 
82
- # Execute a shell command
83
- # This method will output the string and execute it
84
- # Just an alias for sh_no_action
85
- # @param log [boolean] should fastlane print out the executed command
86
- def self.sh(command, log: true)
87
- sh_no_action(command, log: log)
88
- end
89
-
90
- def self.sh_no_action(command, log: true)
91
- # Set the encoding first, the user might have set it wrong
92
- previous_encoding = [Encoding.default_external, Encoding.default_internal]
93
- Encoding.default_external = Encoding::UTF_8
94
- Encoding.default_internal = Encoding::UTF_8
95
-
96
- command = command.join(' ') if command.is_a?(Array) # since it's an array of one element when running from the Fastfile
97
- Helper.log.info ['[SHELL COMMAND]', command.yellow].join(': ') if log
98
-
99
- result = ''
100
- unless Helper.test?
101
- exit_status = nil
102
- status = IO.popen(command, err: [:child, :out]) do |io|
103
- io.each do |line|
104
- Helper.log.info ['[SHELL]', line.strip].join(': ')
105
- result << line
106
- end
107
- io.close
108
- exit_status = $?.exitstatus
109
- end
110
-
111
- if exit_status != 0
112
- # this will also append the output to the exception
113
- raise "Exit status of command '#{command}' was #{exit_status} instead of 0. \n#{result}"
114
- end
115
- else
116
- result << command # only for the tests
117
- end
118
-
119
- result
120
- rescue => ex
121
- raise ex
122
- ensure
123
- Encoding.default_external = previous_encoding.first
124
- Encoding.default_internal = previous_encoding.last
125
- end
126
-
127
57
  # returns a list of official integrations
58
+ # rubocop:disable Style/AccessorMethodName
128
59
  def self.get_all_official_actions
129
- Dir[File.expand_path '*.rb', File.dirname(__FILE__)].collect do |file|
60
+ Dir[File.expand_path('*.rb', File.dirname(__FILE__))].collect do |file|
130
61
  File.basename(file).gsub('.rb', '').to_sym
131
62
  end
132
63
  end
64
+ # rubocop:enable Style/AccessorMethodName
133
65
 
134
66
  def self.load_default_actions
135
- Dir[File.expand_path '*.rb', File.dirname(__FILE__)].each do |file|
67
+ Dir[File.expand_path('*.rb', File.dirname(__FILE__))].each do |file|
68
+ require file
69
+ end
70
+ end
71
+
72
+ # Import all the helpers
73
+ def self.load_helpers
74
+ Dir[File.expand_path('../helper/*.rb', File.dirname(__FILE__))].each do |file|
136
75
  require file
137
76
  end
138
77
  end
@@ -146,7 +85,6 @@ module Fastlane
146
85
  file_name = File.basename(file).gsub('.rb', '')
147
86
 
148
87
  class_name = file_name.fastlane_class + 'Action'
149
- class_ref = nil
150
88
  begin
151
89
  class_ref = Fastlane::Actions.const_get(class_name)
152
90
 
@@ -157,7 +95,7 @@ module Fastlane
157
95
  Helper.log.error 'For more information, check out the docs: https://github.com/KrauseFx/fastlane'
158
96
  raise "Plugin '#{file_name}' is damaged!"
159
97
  end
160
- rescue NameError => ex
98
+ rescue NameError
161
99
  # Action not found
162
100
  Helper.log.error "Could not find '#{class_name}' class defined.".red
163
101
  Helper.log.error 'For more information, check out the docs: https://github.com/KrauseFx/fastlane'
@@ -3,9 +3,9 @@ module Fastlane
3
3
  # Adds a git tag to the current commit
4
4
  class AddGitTagAction < Action
5
5
  def self.run(options)
6
- lane_name = Actions.lane_context[Actions::SharedValues::LANE_NAME].gsub(' ', '') # no spaces allowed
6
+ lane_name = Actions.lane_context[Actions::SharedValues::LANE_NAME].delete(' ') # no spaces allowed
7
7
 
8
- tag = options[:tag] || "#{options[:grouping]}/#{lane_name}/#{options[:prefix]}#{options[:build_number].to_s}"
8
+ tag = options[:tag] || "#{options[:grouping]}/#{lane_name}/#{options[:prefix]}#{options[:build_number]}"
9
9
 
10
10
  Helper.log.info "Adding git tag '#{tag}' 🎯."
11
11
  Actions.sh("git tag \"#{tag}\"")
@@ -36,8 +36,8 @@ module Fastlane
36
36
  end
37
37
 
38
38
  def self.is_supported?(platform)
39
- Actions::DeliverAction.is_supported?platform
39
+ Actions::DeliverAction.is_supported? platform
40
40
  end
41
41
  end
42
42
  end
43
- end
43
+ end
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class BackupFileAction < Action
4
- def self.run params
4
+ def self.run(params)
5
5
  path = params[:path]
6
6
  FileUtils.cp(path, "#{path}.back", {preserve: true})
7
7
  Helper.log.info "Successfully created a backup 💾"
@@ -23,7 +23,7 @@ module Fastlane
23
23
  [
24
24
  FastlaneCore::ConfigItem.new(key: :path,
25
25
  description: "Path to the file you want to backup",
26
- optional: false),
26
+ optional: false)
27
27
  ]
28
28
  end
29
29
  end
@@ -13,7 +13,7 @@ module Fastlane
13
13
  base_destination = params[:destination]
14
14
  zipped = params[:zip]
15
15
  versioned = params[:versioned]
16
-
16
+
17
17
  # Prepare destionation folder
18
18
  full_destination = base_destination
19
19
 
@@ -24,10 +24,10 @@ module Fastlane
24
24
  full_destination = File.expand_path(subfolder, base_destination)
25
25
  end
26
26
 
27
- FileUtils.mkdir(full_destination) unless File.exists?(full_destination)
27
+ FileUtils.mkdir(full_destination) unless File.exist?(full_destination)
28
28
 
29
29
  # Save archive to destination
30
- if zipped
30
+ if zipped
31
31
  Helper.log.info "Compressing #{xcarchive}"
32
32
 
33
33
  xcarchive_folder = File.expand_path(File.dirname(xcarchive))
@@ -35,7 +35,7 @@ module Fastlane
35
35
  zip_file = File.expand_path(File.join("#{xcarchive_file}.zip"))
36
36
 
37
37
  # Create zip
38
- Actions.sh(%Q[cd "#{xcarchive_folder}" && zip -r -X "#{zip_file}" "#{xcarchive_file}" > /dev/null])
38
+ Actions.sh(%(cd "#{xcarchive_folder}" && zip -r -X "#{zip_file}" "#{xcarchive_file}" > /dev/null))
39
39
 
40
40
  # Moved to its final destination
41
41
  FileUtils.mv(zip_file, full_destination)
@@ -47,7 +47,6 @@ module Fastlane
47
47
 
48
48
  Actions.lane_context[SharedValues::BACKUP_XCARCHIVE_FILE] = "#{full_destination}/#{File.basename(xcarchive)}"
49
49
  end
50
-
51
50
  end
52
51
 
53
52
  #####################################################
@@ -65,15 +64,15 @@ module Fastlane
65
64
  default_value: Actions.lane_context[SharedValues::XCODEBUILD_ARCHIVE],
66
65
  optional: false,
67
66
  env_name: 'BACKUP_XCARCHIVE_ARCHIVE',
68
- verify_block: Proc.new do |value|
69
- raise "Couldn't find xcarchive file at path '#{value}'".red if !Helper.test? && !File.exists?(value)
67
+ verify_block: proc do |value|
68
+ raise "Couldn't find xcarchive file at path '#{value}'".red if !Helper.test? && !File.exist?(value)
70
69
  end),
71
70
  FastlaneCore::ConfigItem.new(key: :destination,
72
71
  description: 'Where your archive will be placed',
73
72
  optional: false,
74
73
  env_name: 'BACKUP_XCARCHIVE_DESTINATION',
75
- verify_block: Proc.new do |value|
76
- raise "Couldn't find the destination folder at '#{value}'".red if !Helper.test? && !File.directory?(value) && !File.exists?(value)
74
+ verify_block: proc do |value|
75
+ raise "Couldn't find the destination folder at '#{value}'".red if !Helper.test? && !File.directory?(value) && !File.exist?(value)
77
76
  end),
78
77
  FastlaneCore::ConfigItem.new(key: :zip,
79
78
  description: 'Enable compression of the archive. Default value `true`',
@@ -101,9 +100,9 @@ module Fastlane
101
100
  end
102
101
 
103
102
  def self.is_supported?(platform)
104
- [:ios, :mac].include?platform
103
+ [:ios, :mac].include? platform
105
104
  end
106
-
105
+
107
106
  end
108
107
  end
109
- end
108
+ end
@@ -1,8 +1,10 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class BundleInstallAction < Action
4
+ # rubocop:disable Metrics/CyclomaticComplexity
5
+ # rubocop:disable Metrics/PerceivedComplexity
4
6
  def self.run(params)
5
- if File.exists?('Gemfile')
7
+ if File.exist?('Gemfile')
6
8
  cmd = ['bundle install']
7
9
 
8
10
  cmd << "--binstubs #{params[:binstubs]}" if params[:binstubs]
@@ -29,6 +31,8 @@ module Fastlane
29
31
  Helper.log.info "No Gemfile found"
30
32
  end
31
33
  end
34
+ # rubocop:enable Metrics/CyclomaticComplexity
35
+ # rubocop:enable Metrics/PerceivedComplexity
32
36
 
33
37
  def self.description
34
38
  'This action runs `bundle install` if it founds the Gemfile'