fastlane 1.94.1 → 1.95.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abf2d538974356a73617e41436eb67634f85d4b0
4
- data.tar.gz: 6961e6571d33c1c4571d7bdd8d8b7cbc3b4d7933
3
+ metadata.gz: 921b590defcf803931c86f58eb658a2133171b63
4
+ data.tar.gz: 3a0dcb95d7536cdefed5914fa7f1f875d87a1d67
5
5
  SHA512:
6
- metadata.gz: 266797b99984e870246cffd0c3e74e169d1ada85fd64680d78f6e7679636d870249924c5ab0b8b9e2bf3a35a9b2454f9abccd0d8989a04080d6a9ab4e34923b2
7
- data.tar.gz: aa658aec59566239ec75ea4868c2dbb6b03a00a2c2c9368b27adfdb2c00ce639c7b1c41c24f8395a81f7cd228cc5f0c1a1b01cf8045ff0da5720c7557a9ed94e
6
+ metadata.gz: 5a60703c30be8c8a4342f56f08ebce38978aca3e2458494671526c2befec9cca6b9e961b476a52c0f6dc20d23423885cbb765309946903e7095c423acb15d2d1
7
+ data.tar.gz: bf5ed67015613981439d17fe4fc89f9a5fe2d9527fa8544eabe59607b84df54591494b65b356c456c8251c659b018eb11d4468f82a3c83b17859244bcc85ed39
Binary file
Binary file
@@ -24,6 +24,7 @@ Create a `Gemfile` in your project's directory with the following content
24
24
  ```ruby
25
25
  gem "fastlane"
26
26
  gem "danger"
27
+ gem "danger-device_grid"
27
28
  ```
28
29
 
29
30
  and run
@@ -66,9 +67,7 @@ require 'fastlane'
66
67
  result = Fastlane::OneOff.run(action: "build_and_upload_to_appetize",
67
68
  parameters: options)
68
69
 
69
- require 'fastlane/actions/device_grid/device_grid'
70
-
71
- device_grid(
70
+ device_grid.run(
72
71
  public_key: result,
73
72
  languages: ["en", "de"],
74
73
  devices: ["iphone5s", "iphone6splus", "ipadair"]
@@ -41,7 +41,13 @@ module Fastlane
41
41
  if build_number && build.build_version != build_number
42
42
  next
43
43
  end
44
- download_url = build.details.dsym_url
44
+
45
+ begin
46
+ download_url = build.details.dsym_url
47
+ rescue Spaceship::TunesClient::ITunesConnectError => ex
48
+ UI.error("Error accessing dSYM file for build\n\n#{build}\n\nException: #{ex}")
49
+ end
50
+
45
51
  if download_url
46
52
  result = self.download download_url
47
53
  file_name = "#{app.bundle_id}-#{train_number}-#{build.build_version}.dSYM.zip"
@@ -5,7 +5,7 @@ module Fastlane
5
5
  params[:text] += " (y/n)" if params[:boolean]
6
6
  UI.message(params[:text])
7
7
 
8
- return params[:ci_input] if Helper.is_ci?
8
+ return params[:ci_input] unless UI.interactive?
9
9
 
10
10
  if params[:multi_line_end_keyword]
11
11
  # Multi line
@@ -14,10 +14,12 @@ module Fastlane
14
14
  'git',
15
15
  'push',
16
16
  params[:remote],
17
- "#{local_branch}:#{remote_branch}",
18
- '--tags'
17
+ "#{local_branch}:#{remote_branch}"
19
18
  ]
20
19
 
20
+ # optionally add the tags component
21
+ command << '--tags' if params[:tags]
22
+
21
23
  # optionally add the force component
22
24
  command << '--force' if params[:force]
23
25
 
@@ -48,6 +50,11 @@ module Fastlane
48
50
  description: "Force push to remote. Defaults to false",
49
51
  is_string: false,
50
52
  default_value: false),
53
+ FastlaneCore::ConfigItem.new(key: :tags,
54
+ env_name: "FL_PUSH_GIT_TAGS",
55
+ description: "Wether tags are pushed to remote. Defaults to true",
56
+ is_string: false,
57
+ default_value: true),
51
58
  FastlaneCore::ConfigItem.new(key: :remote,
52
59
  env_name: "FL_GIT_PUSH_REMOTE",
53
60
  description: "The remote to push to. Defaults to `origin`",
@@ -2,12 +2,18 @@ module Fastlane
2
2
  module Actions
3
3
  class UploadSymbolsToSentryAction < Action
4
4
  def self.run(params)
5
+ # Warning about usinging new plugin
6
+ UI.important("It's recommended to use the official Sentry Fastlane plugin")
7
+ UI.important("Github: https://github.com/getsentry/fastlane-plugin-sentry")
8
+ UI.important("Installation: fastlane add_plugin sentry")
9
+
5
10
  Actions.verify_gem!('rest-client')
6
11
  require 'rest-client'
7
12
 
8
13
  # Params - API
9
14
  host = params[:api_host]
10
15
  api_key = params[:api_key]
16
+ auth_token = params[:auth_token]
11
17
  org = params[:org_slug]
12
18
  project = params[:project_slug]
13
19
 
@@ -15,9 +21,24 @@ module Fastlane
15
21
  dsym_path = params[:dsym_path]
16
22
  dsym_paths = params[:dsym_paths] || []
17
23
 
24
+ has_api_key = !api_key.to_s.empty?
25
+ has_auth_token = !auth_token.to_s.empty?
26
+
27
+ # Will fail if none or both authentication methods are provided
28
+ if !has_api_key && !has_auth_token
29
+ UI.user_error!("No API key or authentication token found for SentryAction given, pass using `api_key: 'key'` or `auth_token: 'token'`")
30
+ elsif has_api_key && has_auth_token
31
+ UI.user_error!("Both API key and authentication token found for SentryAction given, please only give one")
32
+ end
33
+
18
34
  # Url to post dSYMs to
19
35
  url = "#{host}/projects/#{org}/#{project}/files/dsyms/"
20
- resource = RestClient::Resource.new(url, api_key, '')
36
+
37
+ if has_api_key
38
+ resource = RestClient::Resource.new(url, api_key, '')
39
+ else
40
+ resource = RestClient::Resource.new(url, headers: { Authorization: "Bearer #{auth_token}" })
41
+ end
21
42
 
22
43
  UI.message "Will upload dSYM(s) to #{url}"
23
44
 
@@ -67,10 +88,12 @@ module Fastlane
67
88
  optional: true),
68
89
  FastlaneCore::ConfigItem.new(key: :api_key,
69
90
  env_name: "SENTRY_API_KEY",
70
- description: "API Key for Sentry",
71
- verify_block: proc do |value|
72
- UI.user_error!("No API token for SentryAction given, pass using `api_key: 'key'`") unless value and !value.empty?
73
- end),
91
+ description: "API key for Sentry",
92
+ optional: true),
93
+ FastlaneCore::ConfigItem.new(key: :auth_token,
94
+ env_name: "SENTRY_AUTH_TOKEN",
95
+ description: "Authentication token for Sentry",
96
+ optional: true),
74
97
  FastlaneCore::ConfigItem.new(key: :org_slug,
75
98
  env_name: "SENTRY_ORG_SLUG",
76
99
  description: "Organization slug for Sentry project",
@@ -15,9 +15,12 @@ module Fastlane
15
15
  FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
16
16
  Fastlane.load_actions
17
17
  Fastlane.plugin_manager.load_plugins
18
+ # *after* loading the plugins
19
+ Fastlane::PluginUpdateManager.start_looking_for_updates
18
20
  self.new.run
19
21
  ensure
20
22
  FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
23
+ Fastlane::PluginUpdateManager.show_update_status
21
24
  end
22
25
 
23
26
  # rubocop:disable Metrics/AbcSize
@@ -76,9 +79,9 @@ module Fastlane
76
79
  c.option "-j", "--json", "Output the lanes in JSON instead of text"
77
80
 
78
81
  c.action do |args, options|
79
- if ensure_fastfile
82
+ if options.json || ensure_fastfile
80
83
  require 'fastlane/lane_list'
81
- path = File.join(Fastlane::FastlaneFolder.fastfile_path)
84
+ path = Fastlane::FastlaneFolder.fastfile_path
82
85
 
83
86
  if options.json
84
87
  Fastlane::LaneList.output_json(path)
@@ -161,7 +161,7 @@ module Fastlane
161
161
  UI.user_error!("Invalid number of elements in this row: #{current}. Must be 2 or 3") unless [2, 3].include? current.count
162
162
  rows << current
163
163
  rows.last[0] = rows.last.first.yellow # color it yellow :)
164
- rows.last << nil while fill_all and rows.last.count < 3 # to have a nice border in the table
164
+ rows.last << nil while fill_all && rows.last.count < 4 # to have a nice border in the table
165
165
  end
166
166
  end
167
167
  end
@@ -45,8 +45,9 @@ module Fastlane
45
45
 
46
46
  # Returns a hash
47
47
  def self.generate_json(path)
48
- ff = Fastlane::FastFile.new(path)
49
48
  output = {}
49
+ return output if path.nil?
50
+ ff = Fastlane::FastFile.new(path)
50
51
 
51
52
  all_keys = ff.runner.lanes.keys
52
53
 
@@ -73,6 +73,8 @@ module Fastlane
73
73
  Fastlane::JUnitGenerator.generate(Fastlane::Actions.executed_actions)
74
74
  print_table(Fastlane::Actions.executed_actions)
75
75
 
76
+ Fastlane::PluginUpdateManager.show_update_status
77
+
76
78
  if error
77
79
  UI.error 'fastlane finished with errors'
78
80
  raise error
@@ -79,6 +79,11 @@ module Fastlane
79
79
  UI.user_error!("fastlane is not setup for this project, make sure you have a fastlane folder") unless pluginfile_path
80
80
  plugin_name = self.class.plugin_prefix + plugin_name unless plugin_name.start_with?(self.class.plugin_prefix)
81
81
 
82
+ if plugin_name.gsub(self.class.plugin_prefix, '').include?("-")
83
+ # e.g. "fastlane-plugin-ya_tu-sabes" (which is invalid)
84
+ UI.user_error!("Plugin name must not contain a '-', did you mean '_'?")
85
+ end
86
+
82
87
  unless plugin_is_added_as_dependency?(plugin_name)
83
88
  content = pluginfile_content || AUTOGENERATED_LINE
84
89
 
@@ -0,0 +1,69 @@
1
+ module Fastlane
2
+ # Alert the user when updates for plugins are available
3
+ class PluginUpdateManager
4
+ def self.start_looking_for_updates
5
+ return if ENV["FASTLANE_SKIP_UPDATE_CHECK"]
6
+
7
+ Thread.new do
8
+ self.plugin_references.each do |plugin_name, current_plugin|
9
+ begin
10
+ self.server_results[plugin_name] = fetch_latest_version(plugin_name)
11
+ rescue
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ def self.show_update_status
18
+ return if ENV["FASTLANE_SKIP_UPDATE_CHECK"]
19
+
20
+ # We set self.server_results to be nil
21
+ # this way the table is not printed twice
22
+ # (next to the summary table or when an exception happens)
23
+ return unless self.server_results.count > 0
24
+
25
+ rows = []
26
+ self.plugin_references.each do |plugin_name, current_plugin|
27
+ latest_version = self.server_results[plugin_name]
28
+ next if latest_version.nil?
29
+ current_version = Gem::Version.new(current_plugin[:version_number])
30
+ next if current_version >= latest_version
31
+
32
+ rows << [
33
+ plugin_name.gsub(PluginManager.plugin_prefix, ''),
34
+ current_version.to_s.red,
35
+ latest_version.to_s.green
36
+ ]
37
+ end
38
+
39
+ if rows.empty?
40
+ UI.verbose("All plugins are up to date")
41
+ return
42
+ end
43
+
44
+ puts Terminal::Table.new({
45
+ rows: rows,
46
+ title: "Plugin updates available".yellow,
47
+ headings: ["Plugin", "Your Version", "Latest Version"]
48
+ })
49
+ UI.message "To update all plugins, just run"
50
+ UI.command "fastlane update_plugins"
51
+ puts ''
52
+ @server_results = nil
53
+ end
54
+
55
+ def self.plugin_references
56
+ Fastlane.plugin_manager.plugin_references
57
+ end
58
+
59
+ def self.fetch_latest_version(gem_name)
60
+ Gem::Version.new(PluginManager.fetch_gem_info_from_rubygems(gem_name)["version"])
61
+ rescue
62
+ nil
63
+ end
64
+
65
+ def self.server_results
66
+ @server_results ||= {}
67
+ end
68
+ end
69
+ end
@@ -9,3 +9,4 @@ require 'fastlane/plugins/plugin_info_collector'
9
9
  require 'fastlane/plugins/plugin_manager'
10
10
  require 'fastlane/plugins/plugin_search'
11
11
  require 'fastlane/plugins/plugin_fetcher'
12
+ require 'fastlane/plugins/plugin_update_manager'
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '1.94.1'.freeze
2
+ VERSION = '1.95.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate building and releasing your iOS and Android apps"
4
4
  end
metadata CHANGED
@@ -1,14 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.94.1
4
+ version: 1.95.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
+ - Michael Furtak
9
+ - Andrea Falcone
10
+ - Sam Phillips
11
+ - David Ohayon
12
+ - Sam Robbins
13
+ - Mark Pirri
14
+ - Hemal Shah
8
15
  autorequire:
9
16
  bindir: bin
10
17
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
18
+ date: 2016-06-10 00:00:00.000000000 Z
12
19
  dependencies:
13
20
  - !ruby/object:Gem::Dependency
14
21
  name: krausefx-shenzhen
@@ -176,7 +183,7 @@ dependencies:
176
183
  requirements:
177
184
  - - ">="
178
185
  - !ruby/object:Gem::Version
179
- version: 0.46.2
186
+ version: 0.46.3
180
187
  - - "<"
181
188
  - !ruby/object:Gem::Version
182
189
  version: 1.0.0
@@ -186,7 +193,7 @@ dependencies:
186
193
  requirements:
187
194
  - - ">="
188
195
  - !ruby/object:Gem::Version
189
- version: 0.46.2
196
+ version: 0.46.3
190
197
  - - "<"
191
198
  - !ruby/object:Gem::Version
192
199
  version: 1.0.0
@@ -230,7 +237,7 @@ dependencies:
230
237
  requirements:
231
238
  - - ">="
232
239
  - !ruby/object:Gem::Version
233
- version: 0.27.1
240
+ version: 0.27.2
234
241
  - - "<"
235
242
  - !ruby/object:Gem::Version
236
243
  version: 1.0.0
@@ -240,7 +247,7 @@ dependencies:
240
247
  requirements:
241
248
  - - ">="
242
249
  - !ruby/object:Gem::Version
243
- version: 0.27.1
250
+ version: 0.27.2
244
251
  - - "<"
245
252
  - !ruby/object:Gem::Version
246
253
  version: 1.0.0
@@ -733,15 +740,8 @@ files:
733
740
  - lib/fastlane/actions/delete_keychain.rb
734
741
  - lib/fastlane/actions/deliver.rb
735
742
  - lib/fastlane/actions/deploygate.rb
743
+ - lib/fastlane/actions/device_grid/.DS_Store
736
744
  - lib/fastlane/actions/device_grid/README.md
737
- - lib/fastlane/actions/device_grid/assets/GridExampleScreenshot.png
738
- - lib/fastlane/actions/device_grid/assets/README.md
739
- - lib/fastlane/actions/device_grid/assets/ipadair.png
740
- - lib/fastlane/actions/device_grid/assets/iphone4s.png
741
- - lib/fastlane/actions/device_grid/assets/iphone5s.png
742
- - lib/fastlane/actions/device_grid/assets/iphone6s.png
743
- - lib/fastlane/actions/device_grid/assets/iphone6splus.png
744
- - lib/fastlane/actions/device_grid/device_grid.rb
745
745
  - lib/fastlane/actions/dotgpg_environment.rb
746
746
  - lib/fastlane/actions/download.rb
747
747
  - lib/fastlane/actions/download_dsyms.rb
@@ -910,6 +910,7 @@ files:
910
910
  - lib/fastlane/plugins/plugin_info_collector.rb
911
911
  - lib/fastlane/plugins/plugin_manager.rb
912
912
  - lib/fastlane/plugins/plugin_search.rb
913
+ - lib/fastlane/plugins/plugin_update_manager.rb
913
914
  - lib/fastlane/plugins/plugins.rb
914
915
  - lib/fastlane/plugins/template/%gem_name%.gemspec.erb
915
916
  - lib/fastlane/plugins/template/.gitignore
@@ -1,6 +0,0 @@
1
- #### Disclaimer
2
-
3
- All product names, logos, and brands are property of their respective owners.
4
- The used device frames were provided by Facebook via the [Facebook Design Resources](https://facebook.github.io/design/devices.html). `fastlane` is in no way affiliated with Facebook.
5
-
6
- > While Facebook has redrawn and shares these assets for the benefit of the design community, Facebook does not own any of the underlying product or user interface designs. By accessing these assets, you agree to obtain all necessary permissions from the underlying rights holders and/or adhere to any applicable brand use guidelines before using them. Facebook disclaims all express or implied warranties with respect to these assets, including non-infringement of intellectual property rights.
@@ -1,109 +0,0 @@
1
- # rubocop:disable Style/IndentationConsistency
2
- # We disable this rule since we intend opening HTML labels
3
- module Danger
4
- class Dangerfile
5
- module DSL
6
- # A danger plugin: https://github.com/danger/danger
7
- class DeviceGrid < Plugin
8
- # @param public_key: The key for the Appetize.io
9
- # @param languages: Array of languages you want to see (e.g. [en, de])
10
- # @param devices: Array of deviecs you want to see (e.g. ["iphone4s", "ipadair"])
11
- # @param prefix_command: Prefix the `fastlane run appetize_viewing_url_generator` command with something
12
- # this can be used to use `bundle exec`
13
- def run(public_key: nil, languages: nil, devices: nil, prefix_command: nil)
14
- # since we fetch the URL from the output we don't need colors
15
- # this will only be changed in the danger sub-process
16
- fastlane_colors_env = "FASTLANE_DISABLE_COLORS"
17
- fastlane_colors_were_disabled = ENV.key?(fastlane_colors_env)
18
- ENV[fastlane_colors_env] = "true"
19
-
20
- devices ||= %w(iphone4s iphone5s iphone6s iphone6splus ipadair)
21
- languages ||= ["en"]
22
-
23
- prefix_command ||= ""
24
- prefix_command += " bundle exec " if File.exist?("Gemfile")
25
-
26
- # To use the local fastlane intead of bundle
27
- prefix_command = "./bin/" if FastlaneCore::Helper.test?
28
-
29
- deep_link_matches = pr_body.match(/:link:\s(.*)/) # :link: emoji
30
- deep_link = deep_link_matches[1] if deep_link_matches
31
-
32
- markdown("<table>")
33
- languages.each do |current_language|
34
- markdown("<tr>")
35
- markdown("<td>")
36
- markdown("<b>#{current_language[0..1]}</b>")
37
- markdown("</td>")
38
-
39
- devices.each do |current_device|
40
- markdown("<td>")
41
-
42
- params = {
43
- public_key: public_key,
44
- language: current_language,
45
- device: current_device
46
- }
47
- params[:launch_url] = deep_link if deep_link
48
- params_str = params.collect { |k, v| "#{k}:\"#{v}\"" }.join(" ")
49
- url = Fastlane::Helper.backticks("#{prefix_command}fastlane run appetize_viewing_url_generator #{params_str}")
50
- url = url.match(%r{Result:.*(https\:\/\/.*)})[1].strip
51
-
52
- markdown("<a href='#{url}'>")
53
- markdown("<p align='center'>")
54
- markdown("<img height='130' src='#{url_for_device(current_device)}' />")
55
- markdown("<br />")
56
- markdown(beautiful_device_name(current_device))
57
- markdown("</p>")
58
- markdown("</a>")
59
-
60
- markdown("</td>")
61
- end
62
- markdown("</tr>")
63
- end
64
- markdown("</table>")
65
- ensure
66
- ENV.delete(fastlane_colors_env) unless fastlane_colors_were_disabled
67
- end
68
-
69
- def beautiful_device_name(str)
70
- return {
71
- iphone4s: "iPhone 4s",
72
- iphone5s: "iPhone 5s",
73
- iphone6s: "iPhone 6s",
74
- iphone6splus: "iPhone 6s Plus",
75
- ipadair: "iPad Air",
76
- iphone6: "iPhone 6",
77
- iphone6plus: "iPhone 6 Plus",
78
- ipadair2: "iPad Air 2",
79
- nexus5: "Nexus 5",
80
- nexus7: "Nexus 7",
81
- nexus9: "Nexus 9"
82
- }[str.to_sym] || str.to_s
83
- end
84
-
85
- def url_for_device(str)
86
- str = str.to_sym
87
- host = "https://raw.githubusercontent.com/fastlane/fastlane/#{Fastlane::VERSION}/fastlane/lib/fastlane/actions/device_grid/assets/"
88
- return {
89
- iphone4s: host + "iphone4s.png",
90
- iphone5s: host + "iphone5s.png",
91
- iphone6: host + "iphone6s.png",
92
- iphone6s: host + "iphone6s.png",
93
- iphone6plus: host + "iphone6splus.png",
94
- iphone6splus: host + "iphone6splus.png",
95
- ipadair: host + "ipadair.png",
96
- ipadair2: host + "ipadair.png"
97
- }[str] || ""
98
- end
99
-
100
- def self.description
101
- [
102
- "Render a grid of devices"
103
- ].join(" ")
104
- end
105
- end
106
- end
107
- end
108
- end
109
- # rubocop:enable Style/IndentationConsistency