fastlane 1.100.0 → 1.101.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/.DS_Store +0 -0
  3. data/lib/assets/.DS_Store +0 -0
  4. data/lib/assets/completions/.DS_Store +0 -0
  5. data/lib/assets/s3_html_template.erb +24 -14
  6. data/lib/fastlane/.DS_Store +0 -0
  7. data/lib/fastlane/actions/actions_helper.rb +2 -2
  8. data/lib/fastlane/actions/bundle_install.rb +0 -2
  9. data/lib/fastlane/actions/commit_version_bump.rb +13 -2
  10. data/lib/fastlane/actions/git_tag_exists.rb +46 -0
  11. data/lib/fastlane/actions/hg_commit_version_bump.rb +0 -2
  12. data/lib/fastlane/actions/import_certificate.rb +5 -1
  13. data/lib/fastlane/actions/latest_testflight_build_number.rb +12 -6
  14. data/lib/fastlane/actions/oclint.rb +2 -2
  15. data/lib/fastlane/actions/s3.rb +4 -3
  16. data/lib/fastlane/actions/scan.rb +2 -1
  17. data/lib/fastlane/actions/set_github_release.rb +0 -2
  18. data/lib/fastlane/actions/update_fastlane.rb +0 -2
  19. data/lib/fastlane/actions/update_project_provisioning.rb +0 -2
  20. data/lib/fastlane/actions/xcode_server_get_assets.rb +0 -2
  21. data/lib/fastlane/actions/xcodebuild.rb +6 -4
  22. data/lib/fastlane/cli_tools_distributor.rb +6 -1
  23. data/lib/fastlane/commands_generator.rb +1 -6
  24. data/lib/fastlane/erb_template_helper.rb +1 -1
  25. data/lib/fastlane/plugins/plugin_manager.rb +4 -1
  26. data/lib/fastlane/plugins/template/.rubocop.yml +7 -12
  27. data/lib/fastlane/runner.rb +0 -2
  28. data/lib/fastlane/{actions → setup}/.DS_Store +0 -0
  29. data/lib/fastlane/setup/crashlytics_beta.rb +10 -3
  30. data/lib/fastlane/setup/crashlytics_beta_command_line_handler.rb +2 -0
  31. data/lib/fastlane/setup/crashlytics_beta_info.rb +9 -0
  32. data/lib/fastlane/setup/crashlytics_beta_info_collector.rb +6 -6
  33. data/lib/fastlane/setup/crashlytics_beta_ui.rb +1 -4
  34. data/lib/fastlane/version.rb +1 -1
  35. metadata +17 -18
  36. data/lib/fastlane/actions/device_grid/.DS_Store +0 -0
  37. data/lib/fastlane/plugins/.DS_Store +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4f94f49145b163b3e66158a97f75eaeebe84253
4
- data.tar.gz: fafe74ed2bff80cc8272c7cb40f1d9f0141bb1b5
3
+ metadata.gz: 5df8150feaee8ad3fb0a24f99f5448f6de813ee0
4
+ data.tar.gz: b83e90b4b915b1260c6cd90e0a99629506d2abcb
5
5
  SHA512:
6
- metadata.gz: 27a87b7b330b560d846d7db68476f9ad5b106c2974c385235af7d06e9829aa97641a97ed8b2343a9ff00c377b0b996896faf7a1e10fd37fbade88d672228ac5e
7
- data.tar.gz: dfc558934a4f4558f68b85b52bac664848e9c6378a1b496b1f1e9132467e18ff593bc77b1aa8287d5a0f704fa8a6fbf6bc447c16f441a7ef73a47b5bedf80e08
6
+ metadata.gz: 3a4c3a375508c106d336a1550f4da41e2560590d5a4f1c9b106ffa786dfeb9ff1870e59b491d711d5c1bdabc4113adcdaef64f2046fea1051e452dd1f0533bf2
7
+ data.tar.gz: e85785e5fad78ffa4a50c38f002a44063b2d1a0a6926300cc7135734a826d86d5c19bf6d73c8f613bfd023d1757cb11869f1f27caf174f6b6389ac806c7be645
Binary file
Binary file
@@ -63,7 +63,7 @@
63
63
  </span> -->
64
64
  </div>
65
65
 
66
- <h3 id="desktop">Please open this page on your iPhone!</h3>
66
+ <h3 id="invalid-device">Please open this page on your iPhone!</h3>
67
67
 
68
68
  <p id="finished">
69
69
  App is being installed. Close Safari using the home button.
@@ -76,20 +76,30 @@
76
76
  </body>
77
77
 
78
78
  <script type='text/javascript'>
79
- // if (/Android/i.test(navigator.userAgent))
80
- // {
81
- // document.getElementById("ios").remove()
82
- // document.getElementById("desktop").remove()
83
- // }
84
- if (/iPhone|iPad|iPod/i.test(navigator.userAgent))
85
- {
86
- // document.getElementById("android").remove()
87
- document.getElementById("desktop").remove()
79
+ // Array of supported devices, 1 is iPhone, 2 is iPad
80
+ var deviceFamily = <%= device_family %>;
81
+
82
+ function isIphoneValid() {
83
+ return deviceFamily.indexOf(1) != -1;
84
+ }
85
+
86
+ function showError(error) {
87
+ document.getElementById("ios").remove();
88
+ document.getElementById("invalid-device").innerHTML = error;
88
89
  }
89
- else
90
- {
91
- document.getElementById("ios").remove()
92
- // document.getElementById("android").remove()
90
+
91
+ function showInstallLink() {
92
+ document.getElementById("invalid-device").remove();
93
+ }
94
+
95
+ if (/iPhone|iPod/i.test(navigator.userAgent) && isIphoneValid() ) {
96
+ showInstallLink();
97
+ } else if (/iPad/i.test(navigator.userAgent)) {
98
+ // All apps (even "iPhone only") can be installed on iPads
99
+ showInstallLink()
100
+ } else {
101
+ var validDeviceName = isIphoneValid() ? "iOS device" : "iPad";
102
+ showError("Please open this page on your " + validDeviceName + "!");
93
103
  }
94
104
  </script>
95
105
  </html>
Binary file
@@ -104,13 +104,13 @@ module Fastlane
104
104
  else
105
105
  UI.error "Could not find method 'run' in class #{class_name}."
106
106
  UI.error 'For more information, check out the docs: https://github.com/fastlane/fastlane/tree/master/fastlane'
107
- UI.user_error!("Action '#{file_name}' is damaged!")
107
+ UI.user_error!("Action '#{file_name}' is damaged!", show_github_issues: true)
108
108
  end
109
109
  rescue NameError
110
110
  # Action not found
111
111
  UI.error "Could not find '#{class_name}' class defined."
112
112
  UI.error 'For more information, check out the docs: https://github.com/fastlane/fastlane/tree/master/fastlane'
113
- UI.user_error!("Action '#{file_name}' is damaged!")
113
+ UI.user_error!("Action '#{file_name}' is damaged!", show_github_issues: true)
114
114
  end
115
115
  end
116
116
  end
@@ -1,7 +1,6 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  class BundleInstallAction < Action
4
- # rubocop:disable Metrics/CyclomaticComplexity
5
4
  # rubocop:disable Metrics/PerceivedComplexity
6
5
  def self.run(params)
7
6
  if gemfile_exists?(params)
@@ -31,7 +30,6 @@ module Fastlane
31
30
  UI.message("No Gemfile found")
32
31
  end
33
32
  end
34
- # rubocop:enable Metrics/CyclomaticComplexity
35
33
  # rubocop:enable Metrics/PerceivedComplexity
36
34
 
37
35
  def self.gemfile_exists?(params)
@@ -1,4 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize
2
1
  module Fastlane
3
2
  module Actions
4
3
  # Commits the current changes in the repo as a version bump, checking to make sure only files which contain version information have been changed.
@@ -55,6 +54,14 @@ module Fastlane
55
54
  end
56
55
  # rubocop:enable Style/MultilineBlockChain
57
56
 
57
+ # Removes .plist files that matched the given expression in the 'ignore' parameter
58
+ ignore_expression = params[:ignore]
59
+ if ignore_expression
60
+ info_plist_files.select! do |info_plist_file|
61
+ !info_plist_file.match(ignore_expression)
62
+ end
63
+ end
64
+
58
65
  # create our list of files that we expect to have changed, they should all be relative to the project root, which should be equal to the git workdir root
59
66
  expected_changed_files = []
60
67
  expected_changed_files << pbxproj_path
@@ -139,6 +146,11 @@ module Fastlane
139
146
  description: "Include Settings.bundle/Root.plist with version bump",
140
147
  optional: true,
141
148
  default_value: false,
149
+ is_string: false),
150
+ FastlaneCore::ConfigItem.new(key: :ignore,
151
+ description: "A regular expression used to filter matched plist files to be modified",
152
+ optional: true,
153
+ default_value: nil,
142
154
  is_string: false)
143
155
  ]
144
156
  end
@@ -153,4 +165,3 @@ module Fastlane
153
165
  end
154
166
  end
155
167
  end
156
- # rubocop:enable Metrics/AbcSize
@@ -0,0 +1,46 @@
1
+ module Fastlane
2
+ module Actions
3
+ class GitTagExistsAction < Action
4
+ def self.run(params)
5
+ result = Actions.sh("git rev-parse -q --verify refs/tags/#{params[:tag].shellescape} || true", log: $verbose).chomp
6
+ !result.empty?
7
+ end
8
+
9
+ #####################################################
10
+ # @!group Documentation
11
+ #####################################################
12
+
13
+ def self.description
14
+ "Checks if the git tag with the given name exists in the current repo"
15
+ end
16
+
17
+ def self.details
18
+ nil
19
+ end
20
+
21
+ def self.available_options
22
+ [
23
+ FastlaneCore::ConfigItem.new(key: :tag,
24
+ description: "The tag name that should be checked")
25
+ ]
26
+ end
27
+
28
+ def self.return_value
29
+ "Boolean value whether the tag exists or not"
30
+ end
31
+
32
+ def self.output
33
+ [
34
+ ]
35
+ end
36
+
37
+ def self.authors
38
+ ["antondomashnev"]
39
+ end
40
+
41
+ def self.is_supported?(platform)
42
+ true
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,4 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize
2
1
  module Fastlane
3
2
  module Actions
4
3
  # Commits version bump.
@@ -155,4 +154,3 @@ module Fastlane
155
154
  end
156
155
  end
157
156
  end
158
- # rubocop:enable Metrics/AbcSize
@@ -9,7 +9,7 @@ module Fastlane
9
9
  command << " -T /usr/bin/codesign"
10
10
  command << " -T /usr/bin/security"
11
11
 
12
- Fastlane::Actions.sh(command, log: false)
12
+ Fastlane::Actions.sh(command, log: params[:log_output])
13
13
  end
14
14
 
15
15
  def self.description
@@ -27,6 +27,10 @@ module Fastlane
27
27
  optional: false),
28
28
  FastlaneCore::ConfigItem.new(key: :certificate_password,
29
29
  description: "Certificate password",
30
+ optional: true),
31
+ FastlaneCore::ConfigItem.new(key: :log_output,
32
+ description: "If output should be logged to the console",
33
+ default_value: false,
30
34
  optional: true)
31
35
  ]
32
36
  end
@@ -19,8 +19,14 @@ module Fastlane
19
19
  version_number = params[:version]
20
20
  unless version_number
21
21
  # Automatically fetch the latest version in testflight
22
- if app.build_trains.keys.last
23
- version_number = app.build_trains.keys.last
22
+ begin
23
+ testflight_version = app.build_trains.keys.last
24
+ rescue
25
+ UI.user_error!("could not find any versions on iTC - and 'version' option is not set") unless params[:version]
26
+ testflight_version = params[:version]
27
+ end
28
+ if testflight_version
29
+ version_number = testflight_version
24
30
  else
25
31
  UI.message("You have to specify a new version number: ")
26
32
  version_number = STDIN.gets.strip
@@ -29,8 +35,8 @@ module Fastlane
29
35
 
30
36
  UI.message("Fetching the latest build number for version #{version_number}")
31
37
 
32
- train = app.build_trains[version_number]
33
38
  begin
39
+ train = app.build_trains[version_number]
34
40
  build_number = train.builds.map(&:build_version).map(&:to_i).sort.last
35
41
  rescue
36
42
  UI.user_error!("could not find a build on iTC - and 'initial_build_number' option is not set") unless params[:initial_build_number]
@@ -73,14 +79,14 @@ module Fastlane
73
79
  description: "The version number whose latest build number we want",
74
80
  optional: true),
75
81
  FastlaneCore::ConfigItem.new(key: :initial_build_number,
76
- env_name: "INTITIAL_BUILD_NUMBER",
82
+ env_name: "INITIAL_BUILD_NUMBER",
77
83
  description: "sets the build number to given value if no build is in current train",
78
- optional: true,
84
+ default_value: 1,
79
85
  is_string: false),
80
86
  FastlaneCore::ConfigItem.new(key: :team_id,
81
87
  env_name: "FASTLANE_TEAM_ID",
82
88
  description: "Your team ID if you're in multiple teams",
83
- default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id),
89
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:itc_team_id),
84
90
  optional: true)
85
91
  ]
86
92
  end
@@ -1,4 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
2
1
  module Fastlane
3
2
  module Actions
4
3
  module SharedValues
@@ -6,6 +5,7 @@ module Fastlane
6
5
  end
7
6
 
8
7
  class OclintAction < Action
8
+ # rubocop:disable Metrics/PerceivedComplexity
9
9
  def self.run(params)
10
10
  oclint_path = params[:oclint_path]
11
11
  if `which #{oclint_path}`.to_s.empty? and !Helper.test?
@@ -190,6 +190,7 @@ module Fastlane
190
190
  default_value: false)
191
191
  ]
192
192
  end
193
+ # rubocop:enable Metrics/PerceivedComplexity
193
194
 
194
195
  def self.output
195
196
  [
@@ -207,4 +208,3 @@ module Fastlane
207
208
  end
208
209
  end
209
210
  end
210
- # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
@@ -1,4 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize
2
1
  require 'fastlane/erb_template_helper'
3
2
  require 'ostruct'
4
3
 
@@ -112,6 +111,7 @@ module Fastlane
112
111
  bundle_id = info['CFBundleIdentifier']
113
112
  bundle_version = info['CFBundleShortVersionString']
114
113
  title = info['CFBundleName']
114
+ device_family = info['UIDeviceFamily']
115
115
  full_version = "#{bundle_version}.#{build_num}"
116
116
 
117
117
  # Creating plist and html names
@@ -146,6 +146,7 @@ module Fastlane
146
146
  else
147
147
  html_template = eth.load("s3_html_template")
148
148
  end
149
+
149
150
  html_render = eth.render(html_template, {
150
151
  url: plist_url,
151
152
  plist_url: plist_url,
@@ -153,7 +154,8 @@ module Fastlane
153
154
  build_num: build_num,
154
155
  bundle_id: bundle_id,
155
156
  bundle_version: bundle_version,
156
- title: title
157
+ title: title,
158
+ device_family: device_family
157
159
  })
158
160
 
159
161
  # Creates version from template
@@ -351,4 +353,3 @@ module Fastlane
351
353
  end
352
354
  end
353
355
  end
354
- # rubocop:enable Metrics/AbcSize
@@ -10,14 +10,15 @@ module Fastlane
10
10
  require 'scan'
11
11
 
12
12
  begin
13
+ destination = values[:destination] # save destination value which can be later overridden
13
14
  Scan.config = values # we set this here to auto-detect missing values, which we need later on
14
15
  unless values[:derived_data_path].to_s.empty?
15
16
  plist_files_before = Dir["#{values[:derived_data_path]}/**/Logs/Test/*TestSummaries.plist"]
16
- Scan.config[:destination] = nil # we have to do this, as otherwise a warning is shown to the user to not set this value
17
17
  end
18
18
 
19
19
  FastlaneCore::UpdateChecker.start_looking_for_update('scan') unless Helper.is_test?
20
20
 
21
+ values[:destination] = destination # restore destination value
21
22
  Scan::Manager.new.work(values)
22
23
 
23
24
  return true
@@ -1,5 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize
2
-
3
1
  module Fastlane
4
2
  module Actions
5
3
  module SharedValues
@@ -26,7 +26,6 @@ module Fastlane
26
26
  "match"
27
27
  ]
28
28
 
29
- # rubocop:disable Metrics/AbcSize
30
29
  def self.run(options)
31
30
  if options[:no_update]
32
31
  return
@@ -103,7 +102,6 @@ module Fastlane
103
102
  exec "FL_NO_UPDATE=true #{$PROGRAM_NAME} #{ARGV.join ' '}"
104
103
  end
105
104
  end
106
- # rubocop:enable Metrics/AbcSize
107
105
 
108
106
  def self.all_installed_tools
109
107
  Gem::Specification.select { |s| ALL_TOOLS.include? s.name }.map(&:name).uniq
@@ -1,5 +1,4 @@
1
1
  # coding: utf-8
2
- # rubocop:disable Metrics/AbcSize
3
2
  module Fastlane
4
3
  module Actions
5
4
  module SharedValues
@@ -133,4 +132,3 @@ module Fastlane
133
132
  end
134
133
  end
135
134
  end
136
- # rubocop:enable Metrics/AbcSize
@@ -1,4 +1,3 @@
1
- # rubocop:disable Metrics/AbcSize
2
1
  module Fastlane
3
2
  module Actions
4
3
  module SharedValues
@@ -293,4 +292,3 @@ module Fastlane
293
292
  end
294
293
  end
295
294
  end
296
- # rubocop:enable Metrics/AbcSize
@@ -280,10 +280,12 @@ module Fastlane
280
280
  # Normalize some values
281
281
  export_options[:teamID] = CredentialsManager::AppfileConfig.try_fetch_value(:team_id) if !export_options[:teamID] && CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
282
282
  export_options[:onDemandResourcesAssetPacksBaseURL] = URI.escape(export_options[:onDemandResourcesAssetPacksBaseURL]) if export_options[:onDemandResourcesAssetPacksBaseURL]
283
- export_options[:manifest][:appURL] = URI.escape(export_options[:manifest][:appURL]) if export_options[:manifest][:appURL]
284
- export_options[:manifest][:displayImageURL] = URI.escape(export_options[:manifest][:displayImageURL]) if export_options[:manifest][:displayImageURL]
285
- export_options[:manifest][:fullSizeImageURL] = URI.escape(export_options[:manifest][:fullSizeImageURL]) if export_options[:manifest][:fullSizeImageURL]
286
- export_options[:manifest][:assetPackManifestURL] = URI.escape(export_options[:manifest][:assetPackManifestURL]) if export_options[:manifest][:assetPackManifestURL]
283
+ if export_options[:manifest]
284
+ export_options[:manifest][:appURL] = URI.escape(export_options[:manifest][:appURL]) if export_options[:manifest][:appURL]
285
+ export_options[:manifest][:displayImageURL] = URI.escape(export_options[:manifest][:displayImageURL]) if export_options[:manifest][:displayImageURL]
286
+ export_options[:manifest][:fullSizeImageURL] = URI.escape(export_options[:manifest][:fullSizeImageURL]) if export_options[:manifest][:fullSizeImageURL]
287
+ export_options[:manifest][:assetPackManifestURL] = URI.escape(export_options[:manifest][:assetPackManifestURL]) if export_options[:manifest][:assetPackManifestURL]
288
+ end
287
289
 
288
290
  # Saves options to plist
289
291
  path = "#{Tempfile.new('exportOptions').path}.plist"
@@ -4,12 +4,17 @@ module Fastlane
4
4
  # tool or fastlane itself
5
5
  class CLIToolsDistributor
6
6
  class << self
7
+ def running_version_command?
8
+ ARGV.include?('-v') || ARGV.include?('--version')
9
+ end
10
+
7
11
  def take_off
8
12
  before_import_time = Time.now
9
13
 
10
14
  require "fastlane" # this might take a long time if there is no Gemfile :(
11
15
 
12
- if Time.now - before_import_time > 3
16
+ # We want to avoid printing output other than the version number if we are running `fastlane -v`
17
+ if Time.now - before_import_time > 3 && !running_version_command?
13
18
  print_slow_fastlane_warning
14
19
  end
15
20
 
@@ -23,8 +23,6 @@ module Fastlane
23
23
  Fastlane::PluginUpdateManager.show_update_status
24
24
  end
25
25
 
26
- # rubocop:disable Metrics/AbcSize
27
- # rubocop:disable Metrics/MethodLength
28
26
  def run
29
27
  program :version, Fastlane::VERSION
30
28
  program :description, [
@@ -43,7 +41,7 @@ module Fastlane
43
41
 
44
42
  command :trigger do |c|
45
43
  c.syntax = 'fastlane [lane]'
46
- c.description = 'Run a sepcific lane. Pass the lane name and optionally the platform first.'
44
+ c.description = 'Run a specific lane. Pass the lane name and optionally the platform first.'
47
45
  c.option '--env STRING', String, 'Add environment to use with `dotenv`'
48
46
 
49
47
  c.action do |args, options|
@@ -265,8 +263,5 @@ module Fastlane
265
263
  UI.important("Instead please submit an issue on GitHub: https://github.com/fastlane/fastlane/issues")
266
264
  UI.important("This command will be removed in one of the next releases")
267
265
  end
268
-
269
- # rubocop:enable Metrics/AbcSize
270
- # rubocop:enable Metrics/MethodLength
271
266
  end
272
267
  end
@@ -8,7 +8,7 @@ module Fastlane
8
8
 
9
9
  def self.load_from_path(template_filepath)
10
10
  unless File.exist?(template_filepath)
11
- UI.user_error!("Could not find Template at path '#{template_filepath}'")
11
+ UI.user_error!("Could not find template at path '#{template_filepath}'")
12
12
  end
13
13
  File.read(template_filepath)
14
14
  end
@@ -293,7 +293,10 @@ module Fastlane
293
293
  UI.error("Please follow the troubleshooting guide: #{TROUBLESHOOTING_URL}")
294
294
  end
295
295
 
296
- print_plugin_information(self.plugin_references) unless self.plugin_references.empty?
296
+ skip_print_plugin_info = self.plugin_references.empty? || CLIToolsDistributor.running_version_command?
297
+
298
+ # We want to avoid printing output other than the version number if we are running `fastlane -v`
299
+ print_plugin_information(self.plugin_references) unless skip_print_plugin_info
297
300
  end
298
301
 
299
302
  # Prints a table all the plugins that were loaded
@@ -47,9 +47,13 @@ Style/SpecialGlobalVars:
47
47
  Enabled: false
48
48
 
49
49
  Metrics/AbcSize:
50
- Max: 60
51
- Exclude:
52
- - '**/lib/*/options.rb'
50
+ Enabled: false
51
+
52
+ Metrics/MethodLength:
53
+ Enabled: false
54
+
55
+ Metrics/CyclomaticComplexity:
56
+ Enabled: false
53
57
 
54
58
  # The %w might be confusing for new users
55
59
  Style/WordArray:
@@ -75,8 +79,6 @@ Style/AndOr:
75
79
  Metrics/ClassLength:
76
80
  Max: 320
77
81
 
78
- Metrics/CyclomaticComplexity:
79
- Max: 17
80
82
 
81
83
  # Configuration parameters: AllowURI, URISchemes.
82
84
  Metrics/LineLength:
@@ -131,13 +133,6 @@ Style/SpaceAroundOperators:
131
133
  Exclude:
132
134
  - '**/spec/actions_specs/xcodebuild_spec.rb'
133
135
 
134
- Metrics/MethodLength:
135
- Exclude:
136
- - '**/lib/fastlane/actions/*.rb'
137
- - '**/bin/fastlane'
138
- - '**/lib/*/options.rb'
139
- Max: 60
140
-
141
136
  AllCops:
142
137
  Include:
143
138
  - '**/fastlane/Fastfile'
@@ -18,7 +18,6 @@ module Fastlane
18
18
  # @param lane_name The name of the lane to execute
19
19
  # @param platform The name of the platform to execute
20
20
  # @param parameters [Hash] The parameters passed from the command line to the lane
21
- # rubocop:disable Metrics/AbcSize
22
21
  def execute(lane, platform = nil, parameters = nil)
23
22
  UI.crash!("No lane given") unless lane
24
23
 
@@ -68,7 +67,6 @@ module Fastlane
68
67
  raise ex
69
68
  end
70
69
  end
71
- # rubocop:enable Metrics/AbcSize
72
70
 
73
71
  # @param filter_platform: Filter, to only show the lanes of a given platform
74
72
  # @return an array of lanes (platform lane_name) to print them out to the user
@@ -50,18 +50,25 @@ module Fastlane
50
50
  crashlytics_path_arg = "\n crashlytics_path: '#{@beta_info.crashlytics_path}',"
51
51
  end
52
52
 
53
+ beta_info_groups = @beta_info.groups_valid? ? "['#{@beta_info.groups.join("', '")}']" : "nil"
54
+ beta_info_emails = @beta_info.emails_valid? ? "['#{@beta_info.emails.join("', '")}']" : "nil"
55
+
53
56
  # rubocop:disable Style/IndentationConsistency
54
57
  %{ #
55
58
  # Learn more here: https://github.com/fastlane/setups/blob/master/samples-ios/distribute-beta-build.md 🚀
56
59
  #
57
- lane :beta do
60
+ lane :beta do |values|
61
+
58
62
  # set 'export_method' to 'ad-hoc' if your Crashlytics Beta distribution uses ad-hoc provisioning
59
63
  gym(scheme: '#{@beta_info.schemes.first}', export_method: '#{@beta_info.export_method}')
60
64
 
65
+ emails = values[:dry_run_email] ? values[:dry_run_email] : #{beta_info_emails} # You can list more emails here
66
+ groups = values[:dry_run_email] ? nil : #{beta_info_groups} # You can define groups on the web and reference them here
67
+
61
68
  crashlytics(api_token: '#{@beta_info.api_key}',
62
69
  build_secret: '#{@beta_info.build_secret}',#{crashlytics_path_arg}
63
- emails: ['#{@beta_info.emails.join("', '")}'], # You can list more emails here
64
- # groups: ['group_alias_1', 'group_alias_2'], # You can define groups on the web and reference them here
70
+ emails: emails,
71
+ groups: groups,
65
72
  notes: 'Distributed with fastlane', # Check out the changelog_from_git_commits action!
66
73
  notifications: true) # Should this distribution notify your testers via email?
67
74
 
@@ -6,6 +6,7 @@ module Fastlane
6
6
  beta_info.api_key = options.api_key
7
7
  beta_info.build_secret = options.build_secret
8
8
  beta_info.emails = options.emails
9
+ beta_info.groups = options.groups
9
10
  beta_info.schemes = [options.scheme] if options.scheme
10
11
  beta_info.export_method = options.export_method
11
12
 
@@ -17,6 +18,7 @@ module Fastlane
17
18
  command.option '--api_key STRING', String, 'Crashlytics API key'
18
19
  command.option '--build_secret STRING', String, 'Crashlytics build secret'
19
20
  command.option '--emails ARRAY', Array, 'List of emails to invite'
21
+ command.option '--groups ARRAY', Array, 'List of group aliases to invite'
20
22
  command.option '--scheme STRING', String, 'Xcode scheme'
21
23
  command.option '--export_method STRING', String, 'Provisioning profile type (ad-hoc, enterprise, development)'
22
24
  end
@@ -6,6 +6,7 @@ module Fastlane
6
6
  attr_accessor :api_key
7
7
  attr_accessor :build_secret
8
8
  attr_accessor :emails
9
+ attr_accessor :groups
9
10
  attr_accessor :schemes
10
11
  attr_accessor :export_method
11
12
 
@@ -17,6 +18,10 @@ module Fastlane
17
18
  @emails = emails ? emails.compact : nil
18
19
  end
19
20
 
21
+ def groups=(groups)
22
+ @groups = groups ? groups.compact : nil
23
+ end
24
+
20
25
  def api_key_valid?
21
26
  !api_key.nil? && api_key.to_s.length == 40
22
27
  end
@@ -33,6 +38,10 @@ module Fastlane
33
38
  !emails.nil? && emails.any? { |email| !email.empty? }
34
39
  end
35
40
 
41
+ def groups_valid?
42
+ !groups.nil? && groups.any? { |groups| !groups.empty? }
43
+ end
44
+
36
45
  def schemes_valid?
37
46
  !schemes.nil? && schemes.size == 1 && !schemes.first.empty?
38
47
  end
@@ -88,7 +88,7 @@ module Fastlane
88
88
  prompt_for_build_secret(info)
89
89
  end
90
90
 
91
- if !info.emails || !info.emails_valid?
91
+ if (!info.emails || !info.emails_valid?) && !info.groups
92
92
  @ui.important "Your email address couldn't be discovered from your project 🔍"
93
93
  prompt_for_email(info)
94
94
  end
@@ -113,7 +113,7 @@ module Fastlane
113
113
 
114
114
  def prompt_for_api_key(info)
115
115
  loop do
116
- info.api_key = @ui.ask("\nPlease provide your Fabric organization's API Key:").strip
116
+ info.api_key = @ui.input("\nPlease provide your Fabric organization's API Key:").strip
117
117
  break if info.api_key_valid?
118
118
  @ui.message "The API Key you provided was invalid (must be 40 characters)."
119
119
  end
@@ -121,7 +121,7 @@ module Fastlane
121
121
 
122
122
  def prompt_for_build_secret(info)
123
123
  loop do
124
- info.build_secret = @ui.ask("\nPlease provide your Fabric organization's Build Secret:").strip
124
+ info.build_secret = @ui.input("\nPlease provide your Fabric organization's Build Secret:").strip
125
125
  break if info.build_secret_valid?
126
126
  @ui.message "The Build Secret you provided was invalid (must be 64 characters)."
127
127
  end
@@ -129,7 +129,7 @@ module Fastlane
129
129
 
130
130
  def prompt_for_crashlytics_path(info)
131
131
  loop do
132
- info.crashlytics_path = @ui.ask("\nPlease provide the path to Crashlytics.framework:").strip
132
+ info.crashlytics_path = @ui.input("\nPlease provide the path to Crashlytics.framework:").strip
133
133
  break if info.crashlytics_path_valid?
134
134
  @ui.message "A submit binary could not be found at the framework path you provided."
135
135
  end
@@ -137,7 +137,7 @@ module Fastlane
137
137
 
138
138
  def prompt_for_email(info)
139
139
  loop do
140
- info.emails = [@ui.ask("\nPlease enter an email address to distribute the beta to:").strip]
140
+ info.emails = [@ui.input("\nPlease enter an email address to distribute the beta to:").strip]
141
141
  break if info.emails_valid?
142
142
  @ui.message "You must provide an email address."
143
143
  end
@@ -147,7 +147,7 @@ module Fastlane
147
147
  current_schemes = info.schemes
148
148
  if current_schemes.nil? || current_schemes.empty?
149
149
  loop do
150
- info.schemes = [@ui.ask("\nPlease enter the name of the scheme you would like to use:").strip]
150
+ info.schemes = [@ui.input("\nPlease enter the name of the scheme you would like to use:").strip]
151
151
  break if info.schemes_valid?
152
152
  @ui.message "You must provide a scheme name."
153
153
  end
@@ -27,11 +27,8 @@ module Fastlane
27
27
  UI.confirm(text)
28
28
  end
29
29
 
30
- def ask(text)
31
- UI.ask(text)
32
- end
33
-
34
30
  def choose(text, options)
31
+ return options[0] unless UI.interactive?
35
32
  message(text)
36
33
  Kernel.choose(*options)
37
34
  end
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '1.100.0'.freeze
2
+ VERSION = '1.101.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate building and releasing your iOS and Android apps"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.100.0
4
+ version: 1.101.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2016-08-10 00:00:00.000000000 Z
18
+ date: 2016-08-18 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: krausefx-shenzhen
@@ -23,14 +23,14 @@ dependencies:
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.14.7
26
+ version: 0.14.10
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.14.7
33
+ version: 0.14.10
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: slack-notifier
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -183,7 +183,7 @@ dependencies:
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- version: 0.48.3
186
+ version: 0.50.2
187
187
  - - "<"
188
188
  - !ruby/object:Gem::Version
189
189
  version: 1.0.0
@@ -193,7 +193,7 @@ dependencies:
193
193
  requirements:
194
194
  - - ">="
195
195
  - !ruby/object:Gem::Version
196
- version: 0.48.3
196
+ version: 0.50.2
197
197
  - - "<"
198
198
  - !ruby/object:Gem::Version
199
199
  version: 1.0.0
@@ -237,7 +237,7 @@ dependencies:
237
237
  requirements:
238
238
  - - ">="
239
239
  - !ruby/object:Gem::Version
240
- version: 0.31.1
240
+ version: 0.31.2
241
241
  - - "<"
242
242
  - !ruby/object:Gem::Version
243
243
  version: 1.0.0
@@ -247,7 +247,7 @@ dependencies:
247
247
  requirements:
248
248
  - - ">="
249
249
  - !ruby/object:Gem::Version
250
- version: 0.31.1
250
+ version: 0.31.2
251
251
  - - "<"
252
252
  - !ruby/object:Gem::Version
253
253
  version: 1.0.0
@@ -277,7 +277,7 @@ dependencies:
277
277
  requirements:
278
278
  - - ">="
279
279
  - !ruby/object:Gem::Version
280
- version: 1.13.0
280
+ version: 1.13.1
281
281
  - - "<"
282
282
  - !ruby/object:Gem::Version
283
283
  version: 2.0.0
@@ -287,7 +287,7 @@ dependencies:
287
287
  requirements:
288
288
  - - ">="
289
289
  - !ruby/object:Gem::Version
290
- version: 1.13.0
290
+ version: 1.13.1
291
291
  - - "<"
292
292
  - !ruby/object:Gem::Version
293
293
  version: 2.0.0
@@ -437,7 +437,7 @@ dependencies:
437
437
  requirements:
438
438
  - - ">="
439
439
  - !ruby/object:Gem::Version
440
- version: 0.11.0
440
+ version: 0.11.3
441
441
  - - "<"
442
442
  - !ruby/object:Gem::Version
443
443
  version: 2.0.0
@@ -447,7 +447,7 @@ dependencies:
447
447
  requirements:
448
448
  - - ">="
449
449
  - !ruby/object:Gem::Version
450
- version: 0.11.0
450
+ version: 0.11.3
451
451
  - - "<"
452
452
  - !ruby/object:Gem::Version
453
453
  version: 2.0.0
@@ -477,7 +477,7 @@ dependencies:
477
477
  requirements:
478
478
  - - ">="
479
479
  - !ruby/object:Gem::Version
480
- version: 0.6.0
480
+ version: 0.6.2
481
481
  - - "<"
482
482
  - !ruby/object:Gem::Version
483
483
  version: 1.0.0
@@ -487,7 +487,7 @@ dependencies:
487
487
  requirements:
488
488
  - - ">="
489
489
  - !ruby/object:Gem::Version
490
- version: 0.6.0
490
+ version: 0.6.2
491
491
  - - "<"
492
492
  - !ruby/object:Gem::Version
493
493
  version: 1.0.0
@@ -714,7 +714,6 @@ files:
714
714
  - lib/fastlane/.DS_Store
715
715
  - lib/fastlane/action.rb
716
716
  - lib/fastlane/action_collector.rb
717
- - lib/fastlane/actions/.DS_Store
718
717
  - lib/fastlane/actions/README.md
719
718
  - lib/fastlane/actions/actions_helper.rb
720
719
  - lib/fastlane/actions/adb.rb
@@ -754,7 +753,6 @@ files:
754
753
  - lib/fastlane/actions/delete_keychain.rb
755
754
  - lib/fastlane/actions/deliver.rb
756
755
  - lib/fastlane/actions/deploygate.rb
757
- - lib/fastlane/actions/device_grid/.DS_Store
758
756
  - lib/fastlane/actions/device_grid/README.md
759
757
  - lib/fastlane/actions/dotgpg_environment.rb
760
758
  - lib/fastlane/actions/download.rb
@@ -779,6 +777,7 @@ files:
779
777
  - lib/fastlane/actions/git_branch.rb
780
778
  - lib/fastlane/actions/git_commit.rb
781
779
  - lib/fastlane/actions/git_pull.rb
780
+ - lib/fastlane/actions/git_tag_exists.rb
782
781
  - lib/fastlane/actions/gradle.rb
783
782
  - lib/fastlane/actions/gym.rb
784
783
  - lib/fastlane/actions/hg_add_tag.rb
@@ -917,7 +916,6 @@ files:
917
916
  - lib/fastlane/new_action.rb
918
917
  - lib/fastlane/one_off.rb
919
918
  - lib/fastlane/other_action.rb
920
- - lib/fastlane/plugins/.DS_Store
921
919
  - lib/fastlane/plugins/plugin_fetcher.rb
922
920
  - lib/fastlane/plugins/plugin_generator.rb
923
921
  - lib/fastlane/plugins/plugin_generator_ui.rb
@@ -946,6 +944,7 @@ files:
946
944
  - lib/fastlane/plugins/template/spec/%plugin_name%_action_spec.rb.erb
947
945
  - lib/fastlane/plugins/template/spec/spec_helper.rb.erb
948
946
  - lib/fastlane/runner.rb
947
+ - lib/fastlane/setup/.DS_Store
949
948
  - lib/fastlane/setup/crashlytics_beta.rb
950
949
  - lib/fastlane/setup/crashlytics_beta_command_line_handler.rb
951
950
  - lib/fastlane/setup/crashlytics_beta_info.rb
@@ -979,7 +978,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
979
978
  version: '0'
980
979
  requirements: []
981
980
  rubyforge_project:
982
- rubygems_version: 2.6.6
981
+ rubygems_version: 2.2.2
983
982
  signing_key:
984
983
  specification_version: 4
985
984
  summary: The easiest way to automate building and releasing your iOS and Android apps