fastlane 2.130.0 → 2.135.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/README.md +64 -64
  3. data/cert/lib/cert/module.rb +2 -0
  4. data/cert/lib/cert/options.rb +6 -0
  5. data/cert/lib/cert/runner.rb +17 -11
  6. data/fastlane/lib/fastlane/action.rb +1 -1
  7. data/fastlane/lib/fastlane/actions/actions_helper.rb +1 -1
  8. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -3
  9. data/fastlane/lib/fastlane/actions/carthage.rb +7 -0
  10. data/fastlane/lib/fastlane/actions/cocoapods.rb +24 -2
  11. data/fastlane/lib/fastlane/actions/copy_artifacts.rb +1 -1
  12. data/fastlane/lib/fastlane/actions/deploygate.rb +1 -1
  13. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  14. data/fastlane/lib/fastlane/actions/docs/sync_code_signing.md +26 -5
  15. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +26 -2
  16. data/fastlane/lib/fastlane/actions/download_dsyms.rb +34 -6
  17. data/fastlane/lib/fastlane/actions/download_from_play_store.rb +1 -1
  18. data/fastlane/lib/fastlane/actions/ensure_env_vars.rb +58 -0
  19. data/fastlane/lib/fastlane/actions/get_version_number.rb +12 -3
  20. data/fastlane/lib/fastlane/actions/gradle.rb +11 -1
  21. data/fastlane/lib/fastlane/actions/onesignal.rb +59 -29
  22. data/fastlane/lib/fastlane/actions/pod_push.rb +10 -1
  23. data/fastlane/lib/fastlane/actions/register_devices.rb +1 -1
  24. data/fastlane/lib/fastlane/actions/resign.rb +2 -2
  25. data/fastlane/lib/fastlane/actions/sonar.rb +16 -0
  26. data/fastlane/lib/fastlane/actions/testfairy.rb +1 -1
  27. data/fastlane/lib/fastlane/actions/update_fastlane.rb +9 -49
  28. data/fastlane/lib/fastlane/actions/update_keychain_access_groups.rb +94 -0
  29. data/fastlane/lib/fastlane/environment_printer.rb +9 -3
  30. data/fastlane/lib/fastlane/fast_file.rb +10 -4
  31. data/fastlane/lib/fastlane/helper/crashlytics_helper.rb +1 -1
  32. data/fastlane/lib/fastlane/lane_manager.rb +1 -1
  33. data/fastlane/lib/fastlane/plugins/plugin_manager.rb +12 -2
  34. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +1 -0
  35. data/fastlane/lib/fastlane/runner.rb +2 -2
  36. data/fastlane/lib/fastlane/setup/setup_android.rb +1 -1
  37. data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +10 -3
  38. data/fastlane/lib/fastlane/swift_fastlane_function.rb +72 -3
  39. data/fastlane/lib/fastlane/swift_runner_upgrader.rb +4 -0
  40. data/fastlane/lib/fastlane/version.rb +1 -1
  41. data/fastlane/swift/Actions.swift +4 -0
  42. data/fastlane/swift/Deliverfile.swift +1 -1
  43. data/fastlane/swift/DeliverfileProtocol.swift +121 -1
  44. data/fastlane/swift/Fastlane.swift +3932 -18
  45. data/fastlane/swift/Gymfile.swift +1 -1
  46. data/fastlane/swift/GymfileProtocol.swift +81 -1
  47. data/fastlane/swift/Matchfile.swift +1 -1
  48. data/fastlane/swift/MatchfileProtocol.swift +65 -1
  49. data/fastlane/swift/Plugins.swift +4 -0
  50. data/fastlane/swift/Precheckfile.swift +1 -1
  51. data/fastlane/swift/PrecheckfileProtocol.swift +15 -2
  52. data/fastlane/swift/Scanfile.swift +1 -1
  53. data/fastlane/swift/ScanfileProtocol.swift +109 -1
  54. data/fastlane/swift/Screengrabfile.swift +1 -1
  55. data/fastlane/swift/ScreengrabfileProtocol.swift +39 -2
  56. data/fastlane/swift/Snapshotfile.swift +1 -1
  57. data/fastlane/swift/SnapshotfileProtocol.swift +71 -1
  58. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +3 -3
  59. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +1 -1
  60. data/fastlane_core/lib/fastlane_core/device_manager.rb +1 -1
  61. data/fastlane_core/lib/fastlane_core/helper.rb +1 -1
  62. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +1 -3
  63. data/fastlane_core/lib/fastlane_core/swag.rb +1 -1
  64. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +1 -1
  65. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +3 -2
  66. data/frameit/lib/frameit/screenshot.rb +4 -0
  67. data/{pilot/lib/pilot/.manager.rb.swp → gym/lib/gym/.module.rb.swp} +0 -0
  68. data/gym/lib/gym/runner.rb +33 -5
  69. data/match/lib/match/generator.rb +1 -0
  70. data/match/lib/match/importer.rb +2 -2
  71. data/match/lib/match/module.rb +2 -0
  72. data/match/lib/match/nuke.rb +5 -5
  73. data/match/lib/match/options.rb +17 -0
  74. data/match/lib/match/runner.rb +10 -6
  75. data/match/lib/match/storage/git_storage.rb +8 -2
  76. data/match/lib/match/storage/google_cloud_storage.rb +85 -33
  77. data/produce/lib/produce/service.rb +7 -1
  78. data/scan/lib/scan/error_handler.rb +9 -4
  79. data/scan/lib/scan/runner.rb +1 -1
  80. data/sigh/lib/assets/resign.sh +2 -2
  81. data/sigh/lib/sigh/runner.rb +13 -5
  82. data/snapshot/lib/snapshot/options.rb +5 -0
  83. data/snapshot/lib/snapshot/reports_generator.rb +3 -0
  84. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +2 -0
  85. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +2 -2
  86. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +16 -1
  87. data/spaceship/lib/spaceship/client.rb +2 -2
  88. data/spaceship/lib/spaceship/connect_api/models/app.rb +6 -6
  89. data/spaceship/lib/spaceship/connect_api/models/build.rb +3 -3
  90. data/spaceship/lib/spaceship/connect_api/models/build_delivery.rb +1 -1
  91. data/spaceship/lib/spaceship/connect_api/models/bundle_id.rb +1 -1
  92. data/spaceship/lib/spaceship/connect_api/models/certificate.rb +1 -1
  93. data/spaceship/lib/spaceship/connect_api/models/device.rb +1 -1
  94. data/spaceship/lib/spaceship/connect_api/models/profile.rb +1 -1
  95. data/spaceship/lib/spaceship/portal/provisioning_profile.rb +1 -1
  96. data/spaceship/lib/spaceship/tunes/app_version.rb +4 -0
  97. data/spaceship/lib/spaceship/tunes/application.rb +4 -0
  98. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +10 -2
  99. data/spaceship/lib/spaceship/tunes/tunes_client.rb +25 -0
  100. data/supply/lib/supply.rb +23 -0
  101. data/{fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp → supply/lib/supply/.client.rb.swp} +0 -0
  102. data/supply/lib/supply/.options.rb.swp +0 -0
  103. data/supply/lib/supply/.uploader.rb.swp +0 -0
  104. data/supply/lib/supply/client.rb +101 -55
  105. data/supply/lib/supply/options.rb +49 -14
  106. data/supply/lib/supply/release_listing.rb +18 -0
  107. data/supply/lib/supply/setup.rb +42 -34
  108. data/supply/lib/supply/uploader.rb +168 -93
  109. metadata +54 -53
  110. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  111. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  112. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  113. data/spaceship/lib/spaceship/connect_api/.DS_Store +0 -0
@@ -45,7 +45,7 @@ module Fastlane
45
45
  end
46
46
  supported_platforms = all_platforms.select { |platform| self.is_supported?(platform.to_sym) }
47
47
 
48
- existing_devices = supported_platforms.map { |platform| Spaceship::Device.all(mac: platform == "mac") }.flatten
48
+ existing_devices = supported_platforms.flat_map { |platform| Spaceship::Device.all(mac: platform == "mac") }
49
49
 
50
50
  device_objs = new_devices.map do |device|
51
51
  next if existing_devices.map(&:udid).include?(device[0])
@@ -26,7 +26,7 @@ module Fastlane
26
26
  )',
27
27
  '# You may provide multiple provisioning profiles if the application contains nested
28
28
  # applications or app extensions, which need their own provisioning profile.
29
- # You can do so by passing an array of provisiong profile strings or a hash
29
+ # You can do so by passing an array of provisioning profile strings or a hash
30
30
  # that associates provisioning profile values to bundle identifier keys.
31
31
  resign(
32
32
  ipa: "path/to/ipa", # can omit if using the `ipa` action
@@ -75,7 +75,7 @@ module Fastlane
75
75
  else [value]
76
76
  end
77
77
  files.each do |file|
78
- UI.user_error!("Couldn't find provisiong profile at path '#{file}'") unless File.exist?(file)
78
+ UI.user_error!("Couldn't find provisioning profile at path '#{file}'") unless File.exist?(file)
79
79
  end
80
80
  end),
81
81
  FastlaneCore::ConfigItem.new(key: :version,
@@ -20,10 +20,12 @@ module Fastlane
20
20
  sonar_scanner_args << "-Dsonar.sourceEncoding=\"#{params[:source_encoding]}\"" if params[:source_encoding]
21
21
  sonar_scanner_args << "-Dsonar.login=\"#{params[:sonar_login]}\"" if params[:sonar_login]
22
22
  sonar_scanner_args << "-Dsonar.host.url=\"#{params[:sonar_url]}\"" if params[:sonar_url]
23
+ sonar_scanner_args << "-Dsonar.organization=\"#{params[:sonar_organization]}\"" if params[:sonar_organization]
23
24
  sonar_scanner_args << "-Dsonar.branch.name=\"#{params[:branch_name]}\"" if params[:branch_name]
24
25
  sonar_scanner_args << "-Dsonar.pullrequest.branch=\"#{params[:pull_request_branch]}\"" if params[:pull_request_branch]
25
26
  sonar_scanner_args << "-Dsonar.pullrequest.base=\"#{params[:pull_request_base]}\"" if params[:pull_request_base]
26
27
  sonar_scanner_args << "-Dsonar.pullrequest.key=\"#{params[:pull_request_key]}\"" if params[:pull_request_key]
28
+
27
29
  sonar_scanner_args << params[:sonar_runner_args] if params[:sonar_runner_args]
28
30
 
29
31
  command = [
@@ -102,6 +104,11 @@ module Fastlane
102
104
  description: "Pass the url of the Sonar server",
103
105
  optional: true,
104
106
  is_string: true),
107
+ FastlaneCore::ConfigItem.new(key: :sonar_organization,
108
+ env_name: "FL_SONAR_ORGANIZATION",
109
+ description: "Key of the organization on SonarCloud",
110
+ optional: true,
111
+ is_string: true),
105
112
  FastlaneCore::ConfigItem.new(key: :branch_name,
106
113
  env_name: "FL_SONAR_RUNNER_BRANCH_NAME",
107
114
  description: "Pass the branch name which is getting scanned",
@@ -144,6 +151,15 @@ module Fastlane
144
151
  project_version: "1.0",
145
152
  project_name: "iOS - AwesomeApp",
146
153
  sources_path: File.expand_path("../AwesomeApp")
154
+ )',
155
+ 'sonar(
156
+ project_key: "name.gretzki.awesomeApp",
157
+ project_version: "1.0",
158
+ project_name: "iOS - AwesomeApp",
159
+ sources_path: File.expand_path("../AwesomeApp"),
160
+ sonar_organization: "myOrg",
161
+ sonar_login: "123456abcdef",
162
+ sonar_url: "https://sonarcloud.io"
147
163
  )'
148
164
  ]
149
165
  end
@@ -33,7 +33,7 @@ module Fastlane
33
33
  req.url("/api/upload/")
34
34
  req.body = options
35
35
  end
36
- rescue Faraday::Error::TimeoutError
36
+ rescue Faraday::TimeoutError
37
37
  UI.crash!("Uploading build to TestFairy timed out ⏳")
38
38
  end
39
39
  end
@@ -10,18 +10,10 @@ module Fastlane
10
10
  def self.run(options)
11
11
  return if options[:no_update] # this is used to update itself
12
12
 
13
- tools_to_update = options[:tools].split(',') unless options[:tools].nil?
14
- tools_to_update ||= all_installed_tools
15
-
16
- if tools_to_update.count == 0
17
- UI.error("No tools specified or couldn't find any installed fastlane.tools")
18
- return
19
- end
20
-
13
+ tools_to_update = ALL_TOOLS
21
14
  UI.message("Looking for updates for #{tools_to_update.join(', ')}...")
22
15
 
23
16
  updater = Gem::CommandManager.instance[:update]
24
- updater.options[:prerelease] = true if options[:nightly]
25
17
  cleaner = Gem::CommandManager.instance[:cleanup]
26
18
 
27
19
  gem_dir = ENV['GEM_HOME'] || Gem.dir
@@ -49,7 +41,6 @@ module Fastlane
49
41
 
50
42
  if update_needed.count == 0
51
43
  UI.success("Nothing to update ✅")
52
- show_information_about_nightly_builds unless options[:nightly]
53
44
  return
54
45
  end
55
46
 
@@ -58,18 +49,13 @@ module Fastlane
58
49
 
59
50
  update_needed.each do |tool_info|
60
51
  tool = tool_info[0]
61
- gem_version = tool_info[1]
62
52
  local_version = Gem::Version.new(highest_versions[tool].version)
63
53
  latest_official_version = FastlaneCore::UpdateChecker.fetch_latest(tool)
64
54
 
65
- if options[:nightly]
66
- UI.message("Updating #{tool} from #{local_version.to_s.yellow} to nightly build #{gem_version.to_s.yellow}... (last official release #{latest_official_version.to_s.yellow}) 🚀")
67
- else
68
- UI.message("Updating #{tool} from #{local_version.to_s.yellow} to #{latest_official_version.to_s.yellow}... 🚀")
69
- end
55
+ UI.message("Updating #{tool} from #{local_version.to_s.yellow} to #{latest_official_version.to_s.yellow}... 🚀")
70
56
 
71
57
  # Approximate_recommendation will create a string like "~> 0.10" from a version 0.10.0, e.g. one that is valid for versions >= 0.10 and <1.0
72
- requirement_version = options[:nightly] ? gem_version : local_version.approximate_recommendation
58
+ requirement_version = local_version.approximate_recommendation
73
59
  updater.update_gem(tool, Gem::Requirement.new(requirement_version))
74
60
 
75
61
  UI.success("Finished updating #{tool}")
@@ -79,34 +65,12 @@ module Fastlane
79
65
  cleaner.options[:args] = tools_to_update
80
66
  cleaner.execute
81
67
 
82
- if options[:nightly]
83
- UI.success("Thanks for using fastlane's nightly builds! This makes it easier for everyone to detect regressions earlier.")
84
- UI.success("Please submit an issue on GitHub if anything behaves differently than it should 🍪")
85
- else
86
- show_information_about_nightly_builds
87
- end
88
-
89
68
  UI.message("fastlane.tools successfully updated! I will now restart myself... 😴")
90
69
 
91
70
  # Set no_update to true so we don't try to update again
92
71
  exec("FL_NO_UPDATE=true #{$PROGRAM_NAME} #{ARGV.join(' ')}")
93
72
  end
94
73
 
95
- def self.show_information_about_nightly_builds
96
- UI.message("")
97
- UI.message("Please help us test early releases of fastlane by opting into nightly builds 🌃")
98
- UI.message("Just replace your `update_fastlane` call with")
99
- UI.message("")
100
- UI.command_output("update_fastlane(nightly: true)")
101
- UI.message("")
102
- UI.message("Nightly builds are reviewed and tested just like the public releases 🚂")
103
- UI.message("")
104
- end
105
-
106
- def self.all_installed_tools
107
- Gem::Specification.select { |s| ALL_TOOLS.include?(s.name) }.map(&:name).uniq
108
- end
109
-
110
74
  def self.description
111
75
  "Makes sure fastlane-tools are up-to-date when running fastlane"
112
76
  end
@@ -134,21 +98,17 @@ module Fastlane
134
98
 
135
99
  def self.available_options
136
100
  [
137
- FastlaneCore::ConfigItem.new(key: :nightly,
138
- env_name: "FL_UPDATE_FASTLANE_NIGHTLY",
139
- description: "Opt-in to install and use nightly fastlane builds",
140
- is_string: false,
141
- default_value: false),
142
101
  FastlaneCore::ConfigItem.new(key: :no_update,
143
102
  env_name: "FL_NO_UPDATE",
144
103
  description: "Don't update during this run. This is used internally",
145
104
  is_string: false,
146
105
  default_value: false),
147
- FastlaneCore::ConfigItem.new(key: :tools,
148
- env_name: "FL_TOOLS_TO_UPDATE",
149
- description: "Comma separated list of fastlane tools to update (e.g. `fastlane,deliver,sigh`)",
150
- deprecated: true,
151
- optional: true)
106
+ FastlaneCore::ConfigItem.new(key: :nightly,
107
+ env_name: "FL_UPDATE_FASTLANE_NIGHTLY",
108
+ description: "Opt-in to install and use nightly fastlane builds",
109
+ is_string: false,
110
+ default_value: false,
111
+ deprecated: "Nightly builds are no longer being made available")
152
112
  ]
153
113
  end
154
114
 
@@ -0,0 +1,94 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ KEYCHAIN_ACCESS_GROUPS = :KEYCHAIN_ACCESS_GROUPS
5
+ end
6
+
7
+ class UpdateKeychainAccessGroupsAction < Action
8
+ require 'plist'
9
+
10
+ def self.run(params)
11
+ UI.message("Entitlements File: #{params[:entitlements_file]}")
12
+ UI.message("New keychain access groups: #{params[:identifiers]}")
13
+
14
+ entitlements_file = params[:entitlements_file]
15
+ UI.user_error!("Could not find entitlements file at path '#{entitlements_file}'") unless File.exist?(entitlements_file)
16
+
17
+ # parse entitlements
18
+ result = Plist.parse_xml(entitlements_file)
19
+ UI.user_error!("Entitlements file at '#{entitlements_file}' cannot be parsed.") unless result
20
+
21
+ # keychain access groups key
22
+ keychain_access_groups_key = 'keychain-access-groups'
23
+
24
+ # get keychain access groups
25
+ keychain_access_groups_field = result[keychain_access_groups_key]
26
+ UI.user_error!("No existing keychain access groups field specified. Please specify an keychain access groups in the entitlements file.") unless keychain_access_groups_field
27
+
28
+ # set new keychain access groups
29
+ UI.message("Old keychain access groups: #{keychain_access_groups_field}")
30
+ result[keychain_access_groups_key] = params[:identifiers]
31
+
32
+ # save entitlements file
33
+ result.save_plist(entitlements_file)
34
+ UI.message("New keychain access groups: #{result[keychain_access_groups_key]}")
35
+
36
+ Actions.lane_context[SharedValues::KEYCHAIN_ACCESS_GROUPS] = result[keychain_access_groups_key]
37
+ end
38
+
39
+ def self.description
40
+ "This action changes the keychain access groups in the entitlements file"
41
+ end
42
+
43
+ def self.details
44
+ "Updates the Keychain Group Access Groups in the given Entitlements file, so you can have keychain access groups for the app store build and keychain access groups for an enterprise build."
45
+ end
46
+
47
+ def self.available_options
48
+ [
49
+ FastlaneCore::ConfigItem.new(key: :entitlements_file,
50
+ env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_ENTITLEMENTS_FILE_PATH", # The name of the environment variable
51
+ description: "The path to the entitlement file which contains the keychain access groups", # a short description of this parameter
52
+ verify_block: proc do |value|
53
+ UI.user_error!("Please pass a path to an entitlements file. ") unless value.include?(".entitlements")
54
+ UI.user_error!("Could not find entitlements file") if !File.exist?(value) && !Helper.test?
55
+ end),
56
+ FastlaneCore::ConfigItem.new(key: :identifiers,
57
+ env_name: "FL_UPDATE_KEYCHAIN_ACCESS_GROUPS_IDENTIFIERS",
58
+ description: "An Array of unique identifiers for the keychain access groups. Eg. ['your.keychain.access.groups.identifiers']",
59
+ is_string: false,
60
+ verify_block: proc do |value|
61
+ UI.user_error!("The parameter identifiers need to be an Array.") unless value.kind_of?(Array)
62
+ end)
63
+ ]
64
+ end
65
+
66
+ def self.output
67
+ [
68
+ ['KEYCHAIN_ACCESS_GROUPS', 'The new Keychain Access Groups']
69
+ ]
70
+ end
71
+
72
+ def self.authors
73
+ ["yutae"]
74
+ end
75
+
76
+ def self.is_supported?(platform)
77
+ platform == :ios
78
+ end
79
+
80
+ def self.example_code
81
+ [
82
+ 'update_keychain_access_groups(
83
+ entitlements_file: "/path/to/entitlements_file.entitlements",
84
+ identifiers: ["your.keychain.access.groups.identifiers"]
85
+ )'
86
+ ]
87
+ end
88
+
89
+ def self.category
90
+ :project
91
+ end
92
+ end
93
+ end
94
+ end
@@ -50,11 +50,11 @@ module Fastlane
50
50
  end
51
51
 
52
52
  def self.print_loaded_plugins
53
- ENV["FASTLANE_ENV_PRINTER"] = "enabled"
54
53
  env_output = "### Loaded fastlane plugins:\n"
55
54
  env_output << "\n"
56
55
  plugin_manager = Fastlane::PluginManager.new
57
- plugin_manager.load_plugins
56
+ plugin_manager.load_plugins(print_table: false)
57
+
58
58
  if plugin_manager.available_plugins.length <= 0
59
59
  env_output << "**No plugins Loaded**\n"
60
60
  else
@@ -211,7 +211,7 @@ module Fastlane
211
211
  "OS" => os_version,
212
212
  "Ruby" => RUBY_VERSION,
213
213
  "Bundler?" => Helper.bundler?,
214
- "Git" => `git --version`.strip.split("\n").first,
214
+ "Git" => git_version,
215
215
  "Installation Source" => anonymized_path($PROGRAM_NAME),
216
216
  "Host" => "#{product} #{version} (#{build})",
217
217
  "Ruby Lib Dir" => anonymized_path(RbConfig::CONFIG['libdir']),
@@ -293,5 +293,11 @@ module Fastlane
293
293
  require 'open3'
294
294
  Open3.popen3('pbcopy') { |input, _, _| input << string }
295
295
  end
296
+
297
+ def self.git_version
298
+ return `git --version`.strip.split("\n").first
299
+ rescue
300
+ return "not found"
301
+ end
296
302
  end
297
303
  end
@@ -26,10 +26,15 @@ module Fastlane
26
26
  'you should turn off smart quotes in your editor of choice.')
27
27
  end
28
28
 
29
- content.scan(/^\s*require (.*)/).each do |current|
29
+ content.scan(/^\s*require ["'](.*?)["']/).each do |current|
30
30
  gem_name = current.last
31
31
  next if gem_name.include?(".") # these are local gems
32
- UI.important("You have required a gem, if this is a third party gem, please use `fastlane_require #{gem_name}` to ensure the gem is installed locally.")
32
+
33
+ begin
34
+ require(gem_name)
35
+ rescue LoadError
36
+ UI.important("You have required a gem, if this is a third party gem, please use `fastlane_require '#{gem_name}'` to ensure the gem is installed locally.")
37
+ end
33
38
  end
34
39
 
35
40
  parse(content, @path)
@@ -190,6 +195,7 @@ module Fastlane
190
195
  # sh("ls")
191
196
  # sh("ls", log: false)
192
197
  # sh(command: "ls")
198
+ # sh(command: "ls", step_name: "listing the files")
193
199
  # sh(command: "ls", log: false)
194
200
  def sh(*args, &b)
195
201
  # First accepts hash (or named keywords) like other actions
@@ -207,8 +213,8 @@ module Fastlane
207
213
  end
208
214
  end
209
215
 
210
- def self.sh(*command, log: true, error_callback: nil, &b)
211
- command_header = log ? Actions.shell_command_from_args(*command) : "shell command"
216
+ def self.sh(*command, step_name: nil, log: true, error_callback: nil, &b)
217
+ command_header = log ? step_name || Actions.shell_command_from_args(*command) : "shell command"
212
218
  Actions.execute_action(command_header) do
213
219
  Actions.sh_no_action(*command, log: log, error_callback: error_callback, &b)
214
220
  end
@@ -108,7 +108,7 @@ module Fastlane
108
108
 
109
109
  UI.important("Downloading Crashlytics Support Library - this might take a minute...")
110
110
  result = http_conn.request_get(uri.path)
111
- UI.error!("#{result.message} (#{result.code})") unless result.kind_of?(Net::HTTPSuccess)
111
+ UI.error("#{result.message} (#{result.code})") unless result.kind_of?(Net::HTTPSuccess)
112
112
  File.write(zip_path, result.body)
113
113
 
114
114
  # Now unzip the file
@@ -113,7 +113,7 @@ module Fastlane
113
113
  rows: FastlaneCore::PrintTable.transform_output(rows)
114
114
  )
115
115
 
116
- UI.message("Welcome to fastlane! Here's what your app is setup to do:")
116
+ UI.message("Welcome to fastlane! Here's what your app is set up to do:")
117
117
 
118
118
  puts(table)
119
119
 
@@ -278,7 +278,7 @@ module Fastlane
278
278
  # fastlane-plugin-[plugin_name]
279
279
  # This will make sure to load the action
280
280
  # and all its helpers
281
- def load_plugins
281
+ def load_plugins(print_table: true)
282
282
  UI.verbose("Checking if there are any plugins that should be loaded...")
283
283
 
284
284
  loaded_plugins = false
@@ -311,7 +311,7 @@ module Fastlane
311
311
  UI.error("Please follow the troubleshooting guide: #{TROUBLESHOOTING_URL}")
312
312
  end
313
313
 
314
- skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command? || FastlaneCore::Env.truthy?("FASTLANE_ENV_PRINTER")
314
+ skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command? || !print_table
315
315
 
316
316
  # We want to avoid printing output other than the version number if we are running `fastlane -v`
317
317
  print_plugin_information(self.plugin_references) unless skip_print_plugin_info
@@ -319,9 +319,12 @@ module Fastlane
319
319
 
320
320
  # Prints a table all the plugins that were loaded
321
321
  def print_plugin_information(references)
322
+ no_action_found = false
323
+
322
324
  rows = references.collect do |current|
323
325
  if current[1][:actions].empty?
324
326
  # Something is wrong with this plugin, no available actions
327
+ no_action_found = true
325
328
  [current[0].red, current[1][:version_number], "No actions found".red]
326
329
  else
327
330
  [current[0], current[1][:version_number], current[1][:actions].join("\n")]
@@ -335,6 +338,13 @@ module Fastlane
335
338
  headings: ["Plugin", "Version", "Action"]
336
339
  }))
337
340
  puts("")
341
+
342
+ if no_action_found
343
+ puts("[!] No actions were found while loading one or more plugins".red)
344
+ puts(" Please use `bundle exec fastlane` with plugins".red)
345
+ puts(" More info - https://docs.fastlane.tools/plugins/using-plugins/#run-with-plugins".red)
346
+ puts("")
347
+ end
338
348
  end
339
349
 
340
350
  #####################################################
@@ -158,6 +158,7 @@ CrossPlatform/ForkUsage:
158
158
  Lint/IsStringUsage:
159
159
  Include:
160
160
  - gym/**/*
161
+ - supply/**/*
161
162
  Style/MethodCallWithArgsParentheses:
162
163
  Enabled: true
163
164
  IgnoredMethods:
@@ -252,13 +252,13 @@ module Fastlane
252
252
  puts(class_ref.deprecated_notes.to_s.remove_markdown.deprecated) if class_ref.deprecated_notes
253
253
  puts("==========================================\n".deprecated)
254
254
  end
255
- class_ref.runner = self # needed to call another action form an action
255
+ class_ref.runner = self # needed to call another action from an action
256
256
  return class_ref.run(arguments)
257
257
  end
258
258
  end
259
259
  rescue Interrupt => e
260
260
  raise e # reraise the interruption to avoid logging this as a crash
261
- rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we dont count as crashes
261
+ rescue FastlaneCore::Interface::FastlaneCommonException => e # these are exceptions that we don't count as crashes
262
262
  raise e
263
263
  rescue FastlaneCore::Interface::FastlaneError => e # user_error!
264
264
  action_completed(method_sym.to_s, status: FastlaneCore::ActionCompletionStatus::USER_ERROR, exception: e)
@@ -55,7 +55,7 @@ module Fastlane
55
55
 
56
56
  self.package_name = UI.input("Package Name (com.krausefx.app): ")
57
57
  puts("")
58
- puts("To automatically upload builds and metadata to Google Play, fastlane needs a service action json secret file".yellow)
58
+ puts("To automatically upload builds and metadata to Google Play, fastlane needs a service account json secret file".yellow)
59
59
  puts("Follow the Setup Guide on how to get the Json file: https://docs.fastlane.tools/actions/supply/".yellow)
60
60
  puts("Feel free to press Enter at any time in order to skip providing pieces of information when asked")
61
61
  self.json_key_file = UI.input("Path to the json secret file: ")