fastlane 1.66.0 → 1.67.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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -38
  3. data/lib/assets/AppfileTemplate +1 -1
  4. data/lib/assets/DefaultFastfileTemplate +2 -2
  5. data/lib/assets/FastfileTemplateAndroid +2 -2
  6. data/lib/assets/custom_action_template.rb +1 -1
  7. data/lib/fastlane/actions/actions_helper.rb +2 -2
  8. data/lib/fastlane/actions/appetize.rb +15 -16
  9. data/lib/fastlane/actions/appium.rb +1 -1
  10. data/lib/fastlane/actions/appledoc.rb +3 -3
  11. data/lib/fastlane/actions/artifactory.rb +7 -7
  12. data/lib/fastlane/actions/backup_file.rb +1 -1
  13. data/lib/fastlane/actions/backup_xcarchive.rb +1 -1
  14. data/lib/fastlane/actions/bundle_install.rb +2 -2
  15. data/lib/fastlane/actions/cert.rb +1 -1
  16. data/lib/fastlane/actions/changelog_from_git_commits.rb +2 -2
  17. data/lib/fastlane/actions/chatwork.rb +2 -2
  18. data/lib/fastlane/actions/clean_build_artifacts.rb +3 -2
  19. data/lib/fastlane/actions/clean_cocoapods_cache.rb +1 -1
  20. data/lib/fastlane/actions/clear_derived_data.rb +2 -2
  21. data/lib/fastlane/actions/clipboard.rb +1 -1
  22. data/lib/fastlane/actions/commit_version_bump.rb +3 -3
  23. data/lib/fastlane/actions/copy_artifacts.rb +2 -2
  24. data/lib/fastlane/actions/crashlytics.rb +6 -6
  25. data/lib/fastlane/actions/create_pull_request.rb +3 -3
  26. data/lib/fastlane/actions/deploygate.rb +6 -6
  27. data/lib/fastlane/actions/dotgpg_environment.rb +1 -1
  28. data/lib/fastlane/actions/download.rb +1 -1
  29. data/lib/fastlane/actions/download_dsyms.rb +117 -0
  30. data/lib/fastlane/actions/ensure_git_branch.rb +1 -1
  31. data/lib/fastlane/actions/ensure_git_status_clean.rb +1 -1
  32. data/lib/fastlane/actions/ensure_no_debug_code.rb +26 -12
  33. data/lib/fastlane/actions/ensure_xcode_version.rb +3 -3
  34. data/lib/fastlane/actions/erb.rb +1 -1
  35. data/lib/fastlane/actions/fastlane_version.rb +1 -1
  36. data/lib/fastlane/actions/frameit.rb +1 -1
  37. data/lib/fastlane/actions/gcovr.rb +2 -2
  38. data/lib/fastlane/actions/get_build_number.rb +1 -1
  39. data/lib/fastlane/actions/get_github_release.rb +6 -6
  40. data/lib/fastlane/actions/get_info_plist_value.rb +2 -2
  41. data/lib/fastlane/actions/get_ipa_info_plist_value.rb +2 -2
  42. data/lib/fastlane/actions/get_version_number.rb +1 -1
  43. data/lib/fastlane/actions/git_add.rb +1 -1
  44. data/lib/fastlane/actions/git_commit.rb +1 -1
  45. data/lib/fastlane/actions/gradle.rb +2 -2
  46. data/lib/fastlane/actions/gym.rb +1 -1
  47. data/lib/fastlane/actions/hg_add_tag.rb +1 -1
  48. data/lib/fastlane/actions/hg_commit_version_bump.rb +3 -3
  49. data/lib/fastlane/actions/hg_ensure_clean_status.rb +1 -1
  50. data/lib/fastlane/actions/hg_push.rb +1 -1
  51. data/lib/fastlane/actions/hipchat.rb +4 -6
  52. data/lib/fastlane/actions/hockey.rb +4 -4
  53. data/lib/fastlane/actions/ifttt.rb +74 -0
  54. data/lib/fastlane/actions/increment_build_number.rb +1 -1
  55. data/lib/fastlane/actions/increment_version_number.rb +3 -3
  56. data/lib/fastlane/actions/install_on_device.rb +1 -1
  57. data/lib/fastlane/actions/install_xcode_plugin.rb +2 -2
  58. data/lib/fastlane/actions/installr.rb +2 -2
  59. data/lib/fastlane/actions/ipa.rb +8 -8
  60. data/lib/fastlane/actions/latest_testflight_build_number.rb +3 -3
  61. data/lib/fastlane/actions/lcov.rb +1 -1
  62. data/lib/fastlane/actions/mailgun.rb +1 -1
  63. data/lib/fastlane/actions/match.rb +2 -2
  64. data/lib/fastlane/actions/notify.rb +1 -1
  65. data/lib/fastlane/actions/oclint.rb +2 -2
  66. data/lib/fastlane/actions/onesignal.rb +3 -3
  67. data/lib/fastlane/actions/opt_out_usage.rb +1 -1
  68. data/lib/fastlane/actions/pilot.rb +1 -1
  69. data/lib/fastlane/actions/pod_push.rb +2 -2
  70. data/lib/fastlane/actions/produce.rb +1 -1
  71. data/lib/fastlane/actions/prompt.rb +3 -3
  72. data/lib/fastlane/actions/push_git_tags.rb +1 -1
  73. data/lib/fastlane/actions/push_to_git_remote.rb +1 -1
  74. data/lib/fastlane/actions/read_podspec.rb +1 -1
  75. data/lib/fastlane/actions/recreate_schemes.rb +1 -1
  76. data/lib/fastlane/actions/register_devices.rb +2 -2
  77. data/lib/fastlane/actions/reset_git_repo.rb +3 -3
  78. data/lib/fastlane/actions/resign.rb +7 -2
  79. data/lib/fastlane/actions/restore_file.rb +1 -1
  80. data/lib/fastlane/actions/rocket.rb +64 -0
  81. data/lib/fastlane/actions/s3.rb +33 -101
  82. data/lib/fastlane/actions/scan.rb +1 -1
  83. data/lib/fastlane/actions/scp.rb +2 -2
  84. data/lib/fastlane/actions/set_changelog.rb +12 -12
  85. data/lib/fastlane/actions/set_github_release.rb +14 -14
  86. data/lib/fastlane/actions/set_info_plist_value.rb +2 -2
  87. data/lib/fastlane/actions/sigh.rb +1 -1
  88. data/lib/fastlane/actions/slack.rb +2 -2
  89. data/lib/fastlane/actions/ssh.rb +4 -4
  90. data/lib/fastlane/actions/supply.rb +1 -1
  91. data/lib/fastlane/actions/team_id.rb +1 -1
  92. data/lib/fastlane/actions/team_name.rb +1 -1
  93. data/lib/fastlane/actions/testfairy.rb +4 -4
  94. data/lib/fastlane/actions/testmunk.rb +3 -3
  95. data/lib/fastlane/actions/tryouts.rb +3 -3
  96. data/lib/fastlane/actions/twitter.rb +1 -1
  97. data/lib/fastlane/actions/typetalk.rb +1 -1
  98. data/lib/fastlane/actions/update_app_group_identifiers.rb +4 -4
  99. data/lib/fastlane/actions/update_app_identifier.rb +4 -4
  100. data/lib/fastlane/actions/update_fastlane.rb +22 -13
  101. data/lib/fastlane/actions/update_info_plist.rb +4 -4
  102. data/lib/fastlane/actions/update_project_code_signing.rb +5 -5
  103. data/lib/fastlane/actions/update_project_provisioning.rb +10 -10
  104. data/lib/fastlane/actions/update_project_team.rb +2 -2
  105. data/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +104 -0
  106. data/lib/fastlane/actions/upload_symbols_to_sentry.rb +119 -0
  107. data/lib/fastlane/actions/verify_pod_keys.rb +2 -2
  108. data/lib/fastlane/actions/verify_xcode.rb +10 -10
  109. data/lib/fastlane/actions/xcode_install.rb +2 -2
  110. data/lib/fastlane/actions/xcode_select.rb +1 -1
  111. data/lib/fastlane/actions/xcode_server_get_assets.rb +8 -8
  112. data/lib/fastlane/actions/xcodebuild.rb +7 -7
  113. data/lib/fastlane/actions/xcov.rb +6 -0
  114. data/lib/fastlane/actions/xctool.rb +2 -2
  115. data/lib/fastlane/command_line_handler.rb +1 -1
  116. data/lib/fastlane/configuration_helper.rb +2 -2
  117. data/lib/fastlane/core_ext/bundler_monkey_patch.rb +14 -0
  118. data/lib/fastlane/core_ext/string.rb +4 -4
  119. data/lib/fastlane/documentation/actions_list.rb +2 -2
  120. data/lib/fastlane/documentation/docs_generator.rb +3 -3
  121. data/lib/fastlane/fast_file.rb +6 -6
  122. data/lib/fastlane/helper/crashlytics_helper.rb +1 -1
  123. data/lib/fastlane/helper/git_helper.rb +2 -2
  124. data/lib/fastlane/one_off.rb +1 -1
  125. data/lib/fastlane/runner.rb +1 -1
  126. data/lib/fastlane/setup/setup.rb +7 -7
  127. data/lib/fastlane/setup/setup_android.rb +13 -13
  128. data/lib/fastlane/setup/setup_ios.rb +24 -27
  129. data/lib/fastlane/version.rb +1 -1
  130. metadata +66 -32
@@ -3,9 +3,9 @@ module Fastlane
3
3
  class ClearDerivedDataAction < Action
4
4
  def self.run(options)
5
5
  path = File.expand_path(options[:derived_data_path])
6
- Helper.log.info "Derived Data path located at: #{path}"
6
+ UI.message("Derived Data path located at: #{path}")
7
7
  FileUtils.rm_rf(path) if File.directory?(path)
8
- Helper.log.info "Successfully cleared Derived Data ♻️".green
8
+ UI.success("Successfully cleared Derived Data ♻️")
9
9
  end
10
10
 
11
11
  #####################################################
@@ -2,7 +2,7 @@ module Fastlane
2
2
  module Actions
3
3
  class ClipboardAction < Action
4
4
  def self.run(params)
5
- Helper.log.info "Storing '#{params[:value]}' in the clipboard 🎨"
5
+ UI.message("Storing '#{params[:value]}' in the clipboard 🎨")
6
6
 
7
7
  `echo "#{params[:value]}" | tr -d '\n' | pbcopy` # we don't use `sh`, as the command looks ugly
8
8
  end
@@ -103,10 +103,10 @@ module Fastlane
103
103
 
104
104
  Actions.sh("git commit -m '#{params[:message]}'")
105
105
 
106
- Helper.log.info "Committed \"#{params[:message]}\" 💾.".green
106
+ UI.success("Committed \"#{params[:message]}\" 💾.")
107
107
  rescue => ex
108
- Helper.log.error ex
109
- Helper.log.info "Didn't commit any changes.".yellow
108
+ UI.error(ex)
109
+ UI.important("Didn't commit any changes.")
110
110
  end
111
111
  end
112
112
 
@@ -10,7 +10,7 @@ module Fastlane
10
10
  base_command = params[:keep_original] ? 'cp' : 'mv'
11
11
  options = []
12
12
  options << '-f'
13
- options << '-r' if params[:keep_original] # we only want the -r flag for the cp command, which we get when the user asks to keep the original
13
+ options << '-R' if params[:keep_original] # we only want the -R flag for the cp command, which we get when the user asks to keep the original
14
14
  options << params[:artifacts].map { |e| e.tr(' ', '\ ') }
15
15
  options << params[:target_path]
16
16
 
@@ -22,7 +22,7 @@ module Fastlane
22
22
  # call our command
23
23
  Actions.sh(command)
24
24
 
25
- Helper.log.info 'Build artifacts sucesfully copied!'.green
25
+ UI.success('Build artifacts sucesfully copied!')
26
26
  end
27
27
 
28
28
  #####################################################
@@ -9,11 +9,11 @@ module Fastlane
9
9
 
10
10
  # We need to store notes in a file, because the crashlytics CLI (iOS) says so
11
11
  if params[:notes]
12
- Helper.log.error "Overwriting :notes_path, because you specified :notes" if params[:notes_path]
12
+ UI.error("Overwriting :notes_path, because you specified :notes") if params[:notes_path]
13
13
 
14
14
  params[:notes_path] = Helper::CrashlyticsHelper.write_to_tempfile(params[:notes], 'changelog').path
15
15
  elsif Actions.lane_context[SharedValues::FL_CHANGELOG] && !params[:notes_path]
16
- Helper.log.info "Sending FL_CHANGELOG as release notes to Beta by Crashlytics"
16
+ UI.message("Sending FL_CHANGELOG as release notes to Beta by Crashlytics")
17
17
 
18
18
  params[:notes_path] = Helper::CrashlyticsHelper.write_to_tempfile(
19
19
  Actions.lane_context[SharedValues::FL_CHANGELOG], 'changelog').path
@@ -27,13 +27,13 @@ module Fastlane
27
27
  raise "You have to either pass an ipa or an apk file to the Crashlytics action".red
28
28
  end
29
29
 
30
- Helper.log.info 'Uploading the build to Crashlytics Beta. Time for some ☕️.'.green
31
- Helper.log.debug command.join(" ") if $verbose
32
- Actions.sh command.join(" ")
30
+ UI.success('Uploading the build to Crashlytics Beta. Time for some ☕️.')
31
+ UI.verbose(command.join(" ")) if $verbose
32
+ Actions.sh(command.join(" "), log: false)
33
33
 
34
34
  return command if Helper.test?
35
35
 
36
- Helper.log.info 'Build successfully uploaded to Crashlytics Beta 🌷'.green
36
+ UI.success('Build successfully uploaded to Crashlytics Beta 🌷')
37
37
  end
38
38
 
39
39
  def self.description
@@ -9,7 +9,7 @@ module Fastlane
9
9
  require 'excon'
10
10
  require 'base64'
11
11
 
12
- Helper.log.info "Creating new pull request from '#{params[:head]}' to branch '#{params[:base]}' of '#{params[:repo]}'"
12
+ UI.message("Creating new pull request from '#{params[:head]}' to branch '#{params[:base]}' of '#{params[:repo]}'")
13
13
 
14
14
  url = "#{params[:api_url]}/repos/#{params[:repo]}/pulls"
15
15
  headers = { 'User-Agent' => 'fastlane-create_pull_request' }
@@ -29,11 +29,11 @@ module Fastlane
29
29
  body = JSON.parse(response.body)
30
30
  number = body['number']
31
31
  html_url = body['html_url']
32
- Helper.log.info "Successfully created pull request ##{number}. You can see it at '#{html_url}'".green
32
+ UI.success("Successfully created pull request ##{number}. You can see it at '#{html_url}'")
33
33
 
34
34
  Actions.lane_context[SharedValues::CREATE_PULL_REQUEST_HTML_URL] = html_url
35
35
  elsif response[:status] != 200
36
- Helper.log.error "GitHub responded with #{response[:status]}: #{response[:body]}".red
36
+ UI.error("GitHub responded with #{response[:status]}: #{response[:body]}")
37
37
  end
38
38
  end
39
39
 
@@ -22,7 +22,7 @@ module Fastlane
22
22
  require 'shenzhen/plugins/deploygate'
23
23
 
24
24
  # Available options: https://deploygate.com/docs/api
25
- Helper.log.info 'Starting with ipa upload to DeployGate... this could take some time ⏳'.green
25
+ UI.success('Starting with ipa upload to DeployGate... this could take some time ⏳')
26
26
 
27
27
  client = Shenzhen::Plugins::DeployGate::Client.new(
28
28
  options[:api_token],
@@ -33,8 +33,8 @@ module Fastlane
33
33
 
34
34
  response = client.upload_build(options[:ipa], options.values)
35
35
  if parse_response(response)
36
- Helper.log.info "DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}"
37
- Helper.log.info "Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!".green
36
+ UI.message("DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}")
37
+ UI.success("Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!")
38
38
  else
39
39
  raise 'Error when trying to upload ipa to DeployGate'.red
40
40
  end
@@ -44,7 +44,7 @@ module Fastlane
44
44
  if response.body && response.body.key?('error')
45
45
 
46
46
  if response.body['error']
47
- Helper.log.error "Error uploading to DeployGate: #{response.body['message']}".red
47
+ UI.error("Error uploading to DeployGate: #{response.body['message']}")
48
48
  help_message(response)
49
49
  return
50
50
  else
@@ -56,7 +56,7 @@ module Fastlane
56
56
  Actions.lane_context[SharedValues::DEPLOYGATE_APP_INFO] = res
57
57
  end
58
58
  else
59
- Helper.log.fatal "Error uploading to DeployGate: #{response.body}".red
59
+ UI.error("Error uploading to DeployGate: #{response.body}")
60
60
  return
61
61
  end
62
62
  true
@@ -73,7 +73,7 @@ module Fastlane
73
73
  when 'application create error: limit'
74
74
  'Plan limit: You have reached to the limit of current plan or your plan was expired.'
75
75
  end
76
- Helper.log.error message.red if message
76
+ UI.error(message) if message
77
77
  end
78
78
  private_class_method :help_message
79
79
 
@@ -8,7 +8,7 @@ module Fastlane
8
8
  Actions.verify_gem!('dotgpg')
9
9
  require 'dotgpg/environment'
10
10
 
11
- Helper.log.info "Reading secrets from #{options[:dotgpg_file]}"
11
+ UI.message("Reading secrets from #{options[:dotgpg_file]}")
12
12
  Dotgpg::Environment.new(options[:dotgpg_file]).apply
13
13
  end
14
14
 
@@ -43,7 +43,7 @@ module Fastlane
43
43
  env_name: "FL_DOWNLOAD_URL",
44
44
  description: "The URL that should be downloaded",
45
45
  verify_block: proc do |value|
46
- Helper.log.warn "The URL doesn't start with http or https" unless value.start_with?("http")
46
+ UI.important("The URL doesn't start with http or https") unless value.start_with?("http")
47
47
  end)
48
48
  ]
49
49
  end
@@ -0,0 +1,117 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ DSYM_PATHS = :DSYM_PATHS
5
+ end
6
+
7
+ class DownloadDsymsAction < Action
8
+ def self.run(params)
9
+ require 'spaceship'
10
+ require 'net/http'
11
+
12
+ UI.message("Login to iTunes Connect (#{params[:username]})")
13
+ Spaceship::Tunes.login(params[:username])
14
+ Spaceship::Tunes.select_team
15
+ UI.message("Login successful")
16
+
17
+ UI.message("Looking for dSYM files for #{params[:app_identifier]}...")
18
+ app = Spaceship::Application.find(params[:app_identifier])
19
+ app.all_build_train_numbers.each do |train_number|
20
+ app.all_builds_for_train(train: train_number).each do |build|
21
+ download_url = build.details.dsym_url
22
+ if download_url
23
+ result = self.download download_url
24
+ file_name = "#{app.bundle_id}-#{train_number}-#{build.build_version}.dSYM.zip"
25
+ File.write(file_name, result)
26
+ UI.success("🔑 Successfully downloaded dSYM file for #{train_number} - #{build.build_version} to '#{file_name}'")
27
+
28
+ Actions.lane_context[SharedValues::DSYM_PATHS] ||= []
29
+ Actions.lane_context[SharedValues::DSYM_PATHS] << File.expand_path(file_name)
30
+ else
31
+ UI.message("No dSYM URL for #{build.build_version} (#{build.train_version})")
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ def self.download(url)
38
+ uri = URI.parse(url)
39
+ http = Net::HTTP.new(uri.host, uri.port)
40
+ http.use_ssl = (uri.scheme == "https")
41
+ res = http.get(uri.request_uri)
42
+ res.body
43
+ end
44
+
45
+ #####################################################
46
+ # @!group Documentation
47
+ #####################################################
48
+
49
+ def self.description
50
+ "Download dSYM files from Apple iTunes Connect for Bitcode apps"
51
+ end
52
+
53
+ def self.details
54
+ [
55
+ "This action downloads dSYM files from Apple iTunes Connect after",
56
+ "the ipa got re-compiled by Apple. Useful if you have Bitcode enabled"
57
+ ].join(" ")
58
+ end
59
+
60
+ def self.available_options
61
+ user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
62
+ user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
63
+
64
+ [
65
+ FastlaneCore::ConfigItem.new(key: :username,
66
+ short_option: "-u",
67
+ env_name: "DOWNLOAD_DSYMS_USERNAME",
68
+ description: "Your Apple ID Username for iTunes Connect",
69
+ default_value: user),
70
+ FastlaneCore::ConfigItem.new(key: :app_identifier,
71
+ short_option: "-a",
72
+ env_name: "DOWNLOAD_DSYMS_APP_IDENTIFIER",
73
+ description: "The bundle identifier of your app",
74
+ optional: true,
75
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
76
+ FastlaneCore::ConfigItem.new(key: :team_id,
77
+ short_option: "-k",
78
+ env_name: "DOWNLOAD_DSYMS_TEAM_ID",
79
+ description: "The ID of your team if you're in multiple teams",
80
+ optional: true,
81
+ is_string: false, # as we also allow integers, which we convert to strings anyway
82
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
83
+ verify_block: proc do |value|
84
+ ENV["FASTLANE_ITC_TEAM_ID"] = value.to_s
85
+ end),
86
+ FastlaneCore::ConfigItem.new(key: :team_name,
87
+ short_option: "-e",
88
+ env_name: "DOWNLOAD_DSYMS_TEAM_NAME",
89
+ description: "The name of your team if you're in multiple teams",
90
+ optional: true,
91
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_name),
92
+ verify_block: proc do |value|
93
+ ENV["FASTLANE_ITC_TEAM_NAME"] = value
94
+ end)
95
+ ]
96
+ end
97
+
98
+ def self.output
99
+ [
100
+ ['DSYM_PATHS', 'An array to all the zipped dSYM files']
101
+ ]
102
+ end
103
+
104
+ def self.return_value
105
+ nil
106
+ end
107
+
108
+ def self.authors
109
+ ["KrauseFx"]
110
+ end
111
+
112
+ def self.is_supported?(platform)
113
+ platform == :ios
114
+ end
115
+ end
116
+ end
117
+ end
@@ -9,7 +9,7 @@ module Fastlane
9
9
  branch = params[:branch]
10
10
  branch_expr = /#{branch}/
11
11
  if Actions.git_branch =~ branch_expr
12
- Helper.log.info "Git branch match `#{branch}`, all good! 💪".green
12
+ UI.success("Git branch match `#{branch}`, all good! 💪")
13
13
  else
14
14
  raise "Git is not on a branch matching `#{branch}`. Current branch is `#{Actions.git_branch}`! Please ensure the repo is checked out to the correct branch.".red
15
15
  end
@@ -10,7 +10,7 @@ module Fastlane
10
10
  repo_clean = `git status --porcelain`.empty?
11
11
 
12
12
  if repo_clean
13
- Helper.log.info 'Git status is clean, all good! 💪'.green
13
+ UI.success('Git status is clean, all good! 💪')
14
14
  Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START] = true
15
15
  else
16
16
  raise 'Git repository is dirty! Please ensure the repo is in a clean state by commiting/stashing/discarding all changes first.'.red
@@ -2,10 +2,26 @@ module Fastlane
2
2
  module Actions
3
3
  class EnsureNoDebugCodeAction < Action
4
4
  def self.run(params)
5
- command = "grep -R '#{params[:text]}' '#{File.absolute_path(params[:path])}'"
5
+ command = "grep -RE '#{params[:text]}' '#{File.absolute_path(params[:path])}'"
6
+
7
+ extensions = []
8
+ extensions << params[:extension] unless params[:extension].nil?
9
+
10
+ if params[:extensions]
11
+ params[:extensions].each do |extension|
12
+ extension.delete!('.') if extension.include? "."
13
+ extensions << extension
14
+ end
15
+ end
16
+
17
+ if extensions.count > 1
18
+ command << " --include=\\*.{#{extensions.join(',')}}"
19
+ elsif extensions.count > 0
20
+ command << " --include=\\*.#{extensions.join(',')}"
21
+ end
6
22
  return command if Helper.is_test?
7
23
 
8
- Helper.log.info command.yellow
24
+ UI.important(command)
9
25
  results = `#{command}` # we don't use `sh` as the return code of grep is wrong for some reason
10
26
 
11
27
  # Example Output
@@ -14,18 +30,11 @@ module Fastlane
14
30
 
15
31
  found = []
16
32
  results.split("\n").each do |current_raw|
17
- current = current_raw.strip
18
- if params[:extension]
19
- if current.include? ".#{params[:extension]}:"
20
- found << current
21
- end
22
- else
23
- found << current
24
- end
33
+ found << current_raw.strip
25
34
  end
26
35
 
27
36
  raise "Found debug code '#{params[:text]}': \n\n#{found.join("\n")}" if found.count > 0
28
- Helper.log.info "No debug code found in code base 🐛"
37
+ UI.message("No debug code found in code base 🐛")
29
38
  end
30
39
 
31
40
  #####################################################
@@ -62,7 +71,12 @@ module Fastlane
62
71
  optional: true,
63
72
  verify_block: proc do |value|
64
73
  value.delete!('.') if value.include? "."
65
- end)
74
+ end),
75
+ FastlaneCore::ConfigItem.new(key: :extensions,
76
+ env_name: "FL_ENSURE_NO_DEBUG_CODE_EXTENSIONS",
77
+ description: "An array of file extensions that should be searched for",
78
+ optional: true,
79
+ is_string: false)
66
80
  ]
67
81
  end
68
82
 
@@ -13,10 +13,10 @@ module Fastlane
13
13
  versions_match = selected_version == "Xcode #{required_version}"
14
14
 
15
15
  if versions_match
16
- Helper.log.info("Selected Xcode version is correct: #{selected_version}".green)
16
+ UI.success("Selected Xcode version is correct: #{selected_version}")
17
17
  else
18
- Helper.log.info("Selected Xcode version is not correct: #{selected_version}. You expected #{required_version}.")
19
- Helper.log.info("To correct this, use: `xcode_select(version: #{required_version})`.")
18
+ UI.message("Selected Xcode version is not correct: #{selected_version}. You expected #{required_version}.")
19
+ UI.message("To correct this, use: `xcode_select(version: #{required_version})`.")
20
20
 
21
21
  raise "Selected Xcode version doesn't match your requirement.\nExpected: Xcode #{required_version}\nActual: #{selected_version}\n"
22
22
  end
@@ -5,7 +5,7 @@ module Fastlane
5
5
  template = File.read(params[:template])
6
6
  result = ERB.new(template).result(OpenStruct.new(params[:placeholders]).instance_eval { binding })
7
7
  File.open(params[:destination], 'w') { |file| file.write(result) } if params[:destination]
8
- Helper.log.info "Successfully parsed template: '#{params[:template]}' and rendered output to: #{params[:destination]}" if params[:destination]
8
+ UI.message("Successfully parsed template: '#{params[:template]}' and rendered output to: #{params[:destination]}") if params[:destination]
9
9
  result
10
10
  end
11
11
 
@@ -15,7 +15,7 @@ module Fastlane
15
15
  raise "The Fastfile requires a fastlane version of >= #{defined_version}. You are on #{Fastlane::VERSION}. Please update using `sudo gem update fastlane`.".red
16
16
  end
17
17
 
18
- Helper.log.info "fastlane version valid"
18
+ UI.message("fastlane version valid")
19
19
  end
20
20
 
21
21
  def self.step_text
@@ -11,7 +11,7 @@ module Fastlane
11
11
  color = Frameit::Color::BLACK
12
12
  color = Frameit::Color::SILVER if config[:white] || config[:silver]
13
13
 
14
- Helper.log.info "Framing screenshots at path #{config[:path]}"
14
+ UI.message("Framing screenshots at path #{config[:path]}")
15
15
 
16
16
  Dir.chdir(config[:path]) do
17
17
  ENV["FRAMEIT_FORCE_DEVICE_TYPE"] = config[:force_device_type] if config[:force_device_type]
@@ -78,8 +78,8 @@ module Fastlane
78
78
  gcovr_args = gcovr_args.join(" ")
79
79
 
80
80
  command = "gcovr #{gcovr_args}"
81
- Helper.log.info "Generating code coverage.".green
82
- Helper.log.debug command
81
+ UI.success("Generating code coverage.")
82
+ UI.verbose(command)
83
83
  Actions.sh command
84
84
  end
85
85
 
@@ -31,7 +31,7 @@ module Fastlane
31
31
  Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
32
32
  end
33
33
  rescue => ex
34
- Helper.log.error 'Make sure to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html'.yellow
34
+ UI.error('Make sure to follow the steps to setup your Xcode project: https://developer.apple.com/library/ios/qa/qa1827/_index.html')
35
35
  raise ex
36
36
  end
37
37
 
@@ -6,7 +6,7 @@ module Fastlane
6
6
 
7
7
  class GetGithubReleaseAction < Action
8
8
  def self.run(params)
9
- Helper.log.info "Getting release on GitHub (#{params[:server_url]}/#{params[:url]}: #{params[:version]})"
9
+ UI.message("Getting release on GitHub (#{params[:server_url]}/#{params[:url]}: #{params[:version]})")
10
10
  require 'excon'
11
11
  require 'base64'
12
12
 
@@ -19,14 +19,14 @@ module Fastlane
19
19
 
20
20
  case response[:status]
21
21
  when 404
22
- Helper.log.error "Repository #{params[:url]} cannot be found, please double check its name and that you provided a valid API token (if it's a private repository).".red
22
+ UI.error("Repository #{params[:url]} cannot be found, please double check its name and that you provided a valid API token (if it's a private repository).")
23
23
  return nil
24
24
  when 401
25
- Helper.log.error "You are not authorized to access #{params[:url]}, please make sure you provided a valid API token.".red
25
+ UI.error("You are not authorized to access #{params[:url]}, please make sure you provided a valid API token.")
26
26
  return nil
27
27
  else
28
28
  if response[:status] != 200
29
- Helper.log.error "GitHub responded with #{response[:status]}:#{response[:body]}".red
29
+ UI.error("GitHub responded with #{response[:status]}:#{response[:body]}")
30
30
  return nil
31
31
  end
32
32
  end
@@ -37,11 +37,11 @@ module Fastlane
37
37
 
38
38
  # Found it
39
39
  Actions.lane_context[SharedValues::GET_GITHUB_RELEASE_INFO] = current
40
- Helper.log.info "Version is already live on GitHub.com 🚁"
40
+ UI.message("Version is already live on GitHub.com 🚁")
41
41
  return current
42
42
  end
43
43
 
44
- Helper.log.info "Couldn't find GitHub release #{params[:version]}".yellow
44
+ UI.important("Couldn't find GitHub release #{params[:version]}")
45
45
  return nil
46
46
  end
47
47