fastlane 2.29.0.beta.20170508010014 → 2.29.0.beta.20170509010055

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18181fe28fb2c568f61c2fee8568427c1f3fd03d
4
- data.tar.gz: e668aa7619b60fc5437a0e97ce65ceb1d5025c59
3
+ metadata.gz: 79dab119b6a1692b4ead44f8386323f44ba9292b
4
+ data.tar.gz: 2eebf681e83782c3db807673b8cac6f579de91aa
5
5
  SHA512:
6
- metadata.gz: ec0a24486ef35aed6406a506da9565753cc2fd00c9e57340066554f4d8843cea6fddce7a8f43217349e03721de1719bc4b804e45256ee38df055cc3d1a1c0f98
7
- data.tar.gz: 3b901a932a161b1ee3c0bfed4092023e39adf3b55e742d64f273468abac170468318f9325c9a013f81c191d15704038c3af0df2faba0d0bfa207f348fd2c0447
6
+ metadata.gz: d7458977c9e7a5458b2576ffb1ffd2896a4d9c4efb1b3c3ff71d6862fc5cacdb3dcf9c05533878adb84c1abb5d66c473cf672a76d0538ce93832e89f99180b6f
7
+ data.tar.gz: ed1aed4dcd68414efb92d6a435d5ef64c90a7768b56e57bddbb98f62bbc8d92091d79e85bc5196c2c3de905a8133cdaaf702383c17fec717c9df68e7a51a37cb
data/README.md CHANGED
@@ -12,7 +12,7 @@ fastlane
12
12
 
13
13
  #### ✨ Check out [docs.fastlane.tools](https://docs.fastlane.tools) on how to get started with fastlane ✨
14
14
 
15
- `fastlane` is a tool for iOS, Mac, and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.
15
+ `fastlane` is a tool for iOS and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.
16
16
 
17
17
  Use a lane to define your process:
18
18
 
@@ -34,7 +34,7 @@ Then to deploy a new 'beta' version of your app just run
34
34
 
35
35
  | | fastlane |
36
36
  |----------|------------|
37
- :sparkles: | Connect iOS, Mac, and Android build tools into one workflow (both _fastlane_ tools and third party tools)
37
+ :sparkles: | Connect iOS and Android build tools into one workflow (both _fastlane_ tools and third party tools)
38
38
  :monorail: | Define different `deployment lanes` for App Store deployment, beta builds, or testing
39
39
  :ship: | Deploy from any computer, including a CI server
40
40
  :wrench: | Extend and customise functionality
@@ -139,6 +139,21 @@ In addition to `fastlane`'s commands, you also have access to these `fastlane` t
139
139
  - [`match`](https://github.com/fastlane/fastlane/tree/master/match): Easily sync your certificates and profiles across your team using Git
140
140
  - [`scan`](https://github.com/fastlane/fastlane/tree/master/scan): The easiest way to run tests for your iOS and Mac apps
141
141
 
142
+ ## Metrics
143
+
144
+ _fastlane_ tracks a few key metrics to understand how developers are using the tool and to help us know what areas need improvement. No personal/sensitive information is ever collected. Metrics that are collected include:
145
+
146
+ * The number of successes, errors, and crashes for _fastlane_ and each action run in a Fastfile
147
+ * The running time of _fastlane_
148
+ * The method by which _fastlane_ was installed
149
+ * Whether _fastlane_ is being run on CI
150
+ * The platform (e.g. iOS, Android) for which _fastlane_ is run
151
+ * A hash of the app identifier or package name, which helps us anonymously identify unique usage of _fastlane_
152
+
153
+ We have recently changed the destination service to which these metrics are reported, as well as the format of the data, but the data that is collected has not changed.
154
+
155
+ You can easily opt-out of metrics collection by adding `opt_out_usage` at the top of your `Fastfile` or by setting the environment variable `FASTLANE_OPT_OUT_USAGE`. Participating helps us provide the best possible support for _fastlane_, so we hope you'll consider it a plus! :heavy_plus_sign:
156
+
142
157
  ## Need Help?
143
158
 
144
159
  Please [submit an issue](https://github.com/fastlane/fastlane/issues) on GitHub and provide information about your setup.
@@ -28,6 +28,7 @@ module Deliver
28
28
  return available_options
29
29
  end
30
30
 
31
+ # rubocop:disable Metrics/PerceivedComplexity
31
32
  def run
32
33
  program :name, 'deliver'
33
34
  program :version, Fastlane::VERSION
@@ -50,7 +51,10 @@ module Deliver
50
51
  c.action do |args, options|
51
52
  options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
52
53
  loaded = options.load_configuration_file("Deliverfile")
53
- loaded = true if options[:description] || options[:ipa] || options[:pkg] # do we have *anything* here?
54
+
55
+ # Check if we already have a deliver setup in the current directory
56
+ loaded = true if options[:description] || options[:ipa] || options[:pkg]
57
+ loaded = true if File.exist?(File.join(FastlaneCore::FastlaneFolder.path || ".", "metadata"))
54
58
  unless loaded
55
59
  if UI.confirm("No deliver configuration found in the current directory. Do you want to setup deliver?")
56
60
  require 'deliver/setup'
@@ -163,5 +167,6 @@ module Deliver
163
167
 
164
168
  run!
165
169
  end
170
+ # rubocop:enable Metrics/PerceivedComplexity
166
171
  end
167
172
  end
data/fastlane/README.md CHANGED
@@ -184,12 +184,6 @@ See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-
184
184
  - [`gym`](https://github.com/fastlane/fastlane/tree/master/gym): Building your iOS apps has never been easier
185
185
  - [`match`](https://github.com/fastlane/fastlane/tree/master/match): Easily sync your certificates and profiles across your team using git
186
186
 
187
- ## Statistics
188
-
189
- `fastlane` tracks the number of errors for each action to detect integration issues. The data will be sent to [fastlane-enhancer](https://github.com/fastlane/enhancer).
190
-
191
- You can easily opt-out by adding `opt_out_usage` to your `Fastfile` or by setting the environment variable `FASTLANE_OPT_OUT_USAGE`. To also disable update checks, set the `FASTLANE_SKIP_UPDATE_CHECK` variable.
192
-
193
187
  ## Credentials
194
188
  A detailed description about how `fastlane` stores your credentials is available on a [separate repo](https://github.com/fastlane/fastlane/tree/master/credentials_manager).
195
189
 
@@ -69,5 +69,5 @@ end
69
69
  # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
70
70
  # All available actions: https://docs.fastlane.tools/actions
71
71
 
72
- # fastlane reports which actions are used
73
- # No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
72
+ # fastlane reports which actions are used. No personal data is recorded.
73
+ # Learn more at https://github.com/fastlane/fastlane#metrics
@@ -62,5 +62,5 @@ end
62
62
  # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
63
63
  # All available actions: https://docs.fastlane.tools/actions
64
64
 
65
- # fastlane reports which actions are used
66
- # No personal data is sent or shared. Learn more at https://github.com/fastlane/enhancer
65
+ # fastlane reports which actions are used. No personal data is recorded.
66
+ # Learn more at https://github.com/fastlane/fastlane#metrics
@@ -19,12 +19,12 @@ module Fastlane
19
19
  end
20
20
 
21
21
  def show_message
22
- UI.message("Sending Crash/Success information. More information on: https://github.com/fastlane/enhancer")
22
+ UI.message("Sending Crash/Success information. Learn more at https://github.com/fastlane/fastlane#metrics")
23
23
  UI.message("No personal/sensitive data is sent. Only sharing the following:")
24
24
  UI.message(launches)
25
25
  UI.message(@error) if @error
26
26
  UI.message("This information is used to fix failing actions and improve integrations that are often used.")
27
- UI.message("You can disable this by adding `opt_out_usage` to your Fastfile")
27
+ UI.message("You can disable this by adding `opt_out_usage` at the top of your Fastfile")
28
28
  end
29
29
 
30
30
  def determine_version(name)
@@ -13,9 +13,9 @@ module Fastlane
13
13
  def self.details
14
14
  [
15
15
  "By default, fastlane will track what actions are being used",
16
- "No personal information is shared. More information available on",
17
- "https://github.com/fastlane/enhancer",
18
- "Add `opt_out_usage` at the top of your Fastfile"
16
+ "No personal/sensitive information is recorded.",
17
+ "Learn more at https://github.com/fastlane/fastlane#metrics",
18
+ "Add `opt_out_usage` at the top of your Fastfile to disable metrics collection"
19
19
  ].join(' ')
20
20
  end
21
21
 
@@ -47,9 +47,9 @@ module Fastlane
47
47
  end
48
48
 
49
49
  def show_analytics
50
- UI.message("fastlane will send the number of errors for each action to")
51
- UI.message("https://github.com/fastlane/enhancer to detect integration issues")
50
+ UI.message("fastlane will collect the number of errors for each action to detect integration issues")
52
51
  UI.message("No sensitive/private information will be uploaded")
52
+ UI.message("Learn more at https://github.com/fastlane/fastlane#metrics")
53
53
  end
54
54
  end
55
55
  end
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.29.0.beta.20170508010014'.freeze
2
+ VERSION = '2.29.0.beta.20170509010055'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -2,7 +2,7 @@ module FastlaneCore
2
2
  class BuildWatcher
3
3
  class << self
4
4
  # @return The build we waited for. This method will always return a build
5
- def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil)
5
+ def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, poll_interval: 10)
6
6
  # First, find the train and build version we want to watch for
7
7
  watched_build = watching_build(app_id: app_id, platform: platform)
8
8
  UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
@@ -16,7 +16,7 @@ module FastlaneCore
16
16
  return matched_build
17
17
  end
18
18
 
19
- sleep 10
19
+ sleep poll_interval
20
20
  end
21
21
  end
22
22
 
@@ -1,6 +1,6 @@
1
1
  module FastlaneCore
2
2
  class ToolCollector
3
- HOST_URL = ENV['FASTLANE_ENHANCER_URL'] || "https://enhancer.fastlane.tools"
3
+ # Learn more at https://github.com/fastlane/fastlane#metrics
4
4
 
5
5
  # This is the original error reporting mechanism, which has always represented
6
6
  # either controlled (UI.user_error!), or uncontrolled (UI.crash!, anything else)
@@ -61,41 +61,72 @@ module FastlaneCore
61
61
  show_message
62
62
  end
63
63
 
64
- # `fastfile_id` helps us track success/failure metrics for Fastfiles we
65
- # generate as part of an automated process.
66
64
  require 'excon'
67
- url = HOST_URL + '/did_launch?'
68
- url += URI.encode_www_form(
69
- versions: versions.to_json,
70
- steps: launches.to_json,
71
- error: @error || "",
72
- crash: @crash ? @error : "",
73
- fastfile_id: ENV["GENERATED_FASTFILE_ID"] || ""
74
- )
75
-
76
- if Helper.is_test? # don't send test data
77
- return url
78
- else
65
+ url = ENV["FASTLANE_METRICS_URL"] || "https://fastlane-metrics.fabric.io/public"
66
+
67
+ analytic_event_body = create_analytic_event_body
68
+
69
+ # Never generate web requests during tests
70
+ unless Helper.test?
79
71
  fork do
80
72
  begin
81
- Excon.post(url)
73
+ Excon.post(url,
74
+ body: analytic_event_body,
75
+ headers: { "Content-Type" => 'application/json' })
82
76
  rescue
83
77
  # we don't want to show a stack trace if something goes wrong
84
78
  end
85
79
  end
86
- return true
87
80
  end
81
+
82
+ return true
88
83
  rescue
89
84
  # We don't care about connection errors
90
85
  end
91
86
 
87
+ def create_analytic_event_body
88
+ analytics = []
89
+ timestamp_seconds = Time.now.to_i
90
+
91
+ # `fastfile_id` helps us track success/failure metrics for Fastfiles we
92
+ # generate as part of an automated process.
93
+ fastfile_id = ENV["GENERATED_FASTFILE_ID"]
94
+
95
+ if fastfile_id && launches.size == 1 && launches['fastlane']
96
+ if crash
97
+ completion_status = 'crash'
98
+ elsif error
99
+ completion_status = 'error'
100
+ else
101
+ completion_status = 'success'
102
+ end
103
+ analytics << event_for_web_onboarding(fastfile_id, completion_status, timestamp_seconds)
104
+ end
105
+
106
+ launches.each do |action, count|
107
+ action_version = versions[action] || 'unknown'
108
+ if crash && error == action
109
+ action_completion_status = 'crash'
110
+ elsif action == error
111
+ action_completion_status = 'error'
112
+ else
113
+ action_completion_status = 'success'
114
+ end
115
+ analytics << event_for_completion(action, action_completion_status, action_version, timestamp_seconds)
116
+ analytics << event_for_count(action, count, action_version, timestamp_seconds)
117
+ end
118
+
119
+ { analytics: analytics }.to_json
120
+ end
121
+
92
122
  def show_message
93
- UI.message("Sending Crash/Success information. More information on: https://github.com/fastlane/enhancer")
123
+ UI.message("Sending Crash/Success information")
124
+ UI.message("Learn more at https://github.com/fastlane/fastlane#metrics")
94
125
  UI.message("No personal/sensitive data is sent. Only sharing the following:")
95
126
  UI.message(launches)
96
127
  UI.message(@error) if @error
97
128
  UI.message("This information is used to fix failing tools and improve those that are most often used.")
98
- UI.message("You can disable this by setting the environment variable: FASTLANE_OPT_OUT_USAGE=1")
129
+ UI.message("You can disable this by adding `opt_out_usage` at the top of your Fastfile")
99
130
  end
100
131
 
101
132
  def launches
@@ -121,7 +152,7 @@ module FastlaneCore
121
152
  end
122
153
 
123
154
  # Returns nil if we shouldn't track this action
124
- # Returns a (maybe modified) name that should be sent to the enhancer web service
155
+ # Returns a (maybe modified) name that should be sent to the analytic ingester
125
156
  # Modificiation is used to prefix the action name with the name of the plugin
126
157
  def name_to_track(name)
127
158
  return nil unless is_official?(name)
@@ -182,5 +213,79 @@ module FastlaneCore
182
213
 
183
214
  return nil
184
215
  end
216
+
217
+ def event_for_web_onboarding(fastfile_id, completion_status, timestamp_seconds)
218
+ {
219
+ event_source: {
220
+ oauth_app_name: 'fastlane-enhancer',
221
+ product: 'fastlane_web_onboarding'
222
+ },
223
+ actor: {
224
+ name: 'customer',
225
+ detail: fastfile_id
226
+ },
227
+ action: {
228
+ name: 'fastfile_executed'
229
+ },
230
+ primary_target: {
231
+ name: 'fastlane_completion_status',
232
+ detail: completion_status
233
+ },
234
+ millis_since_epoch: timestamp_seconds * 1000,
235
+ version: 1
236
+ }
237
+ end
238
+
239
+ def event_for_completion(action, completion_status, version, timestamp_seconds)
240
+ {
241
+ event_source: {
242
+ oauth_app_name: 'fastlane-enhancer',
243
+ product: 'fastlane'
244
+ },
245
+ actor: {
246
+ name: 'action',
247
+ detail: action
248
+ },
249
+ action: {
250
+ name: 'execution_completed'
251
+ },
252
+ primary_target: {
253
+ name: 'completion_status',
254
+ detail: completion_status
255
+ },
256
+ secondary_target: {
257
+ name: 'version',
258
+ detail: version
259
+ },
260
+ millis_since_epoch: timestamp_seconds * 1000,
261
+ version: 1
262
+ }
263
+ end
264
+
265
+ def event_for_count(action, count, version, timestamp_seconds)
266
+ {
267
+ event_source: {
268
+ oauth_app_name: 'fastlane-enhancer',
269
+ product: 'fastlane'
270
+ },
271
+ actor: {
272
+ name: 'action',
273
+ detail: action
274
+ },
275
+ action: {
276
+ name: 'execution_counted'
277
+ },
278
+ primary_target: {
279
+ name: 'count',
280
+ detail: count.to_s || "1"
281
+ },
282
+ secondary_target: {
283
+ name: 'version',
284
+ detail: version
285
+ },
286
+ millis_since_epoch: timestamp_seconds * 1000,
287
+ version: 1
288
+ }
289
+ end
185
290
  end
186
291
  end
@@ -153,8 +153,8 @@ module FastlaneCore
153
153
  # Use this method to exit the program because of a test failure
154
154
  # that's caused by the source code of the user. Example for this
155
155
  # is that scan will fail when the tests fail.
156
- # By using this method we'll get more accurate results on the
157
- # fastlane failures on enhancer
156
+ # By using this method we'll have more accurate results about
157
+ # fastlane failures
158
158
  def test_failure!(error_message)
159
159
  raise FastlaneTestFailure.new, error_message
160
160
  end
@@ -6,20 +6,25 @@ require 'fastlane_core/update_checker/changelog'
6
6
  module FastlaneCore
7
7
  # Verifies, the user runs the latest version of this gem
8
8
  class UpdateChecker
9
- # This web service is fully open source: https://github.com/fastlane/refresher
10
- UPDATE_URL = "https://refresher.fastlane.tools/"
11
-
12
9
  def self.start_looking_for_update(gem_name)
13
10
  return if Helper.is_test?
14
11
  return if FastlaneCore::Env.truthy?("FASTLANE_SKIP_UPDATE_CHECK")
15
12
 
16
13
  @start_time = Time.now
17
14
 
18
- url = generate_fetch_url(gem_name)
19
15
  Thread.new do
20
16
  begin
21
- server_results[gem_name] = fetch_latest(url)
17
+ send_launch_analytic_events_for(gem_name)
18
+ rescue
19
+ # we don't want to show a stack trace if something goes wrong
20
+ end
21
+ end
22
+
23
+ Thread.new do
24
+ begin
25
+ server_results[gem_name] = fetch_latest(gem_name)
22
26
  rescue
27
+ # we don't want to show a stack trace if something goes wrong
23
28
  end
24
29
  end
25
30
  end
@@ -28,6 +33,10 @@ module FastlaneCore
28
33
  @results ||= {}
29
34
  end
30
35
 
36
+ class << self
37
+ attr_reader :start_time
38
+ end
39
+
31
40
  def self.update_available?(gem_name, current_version)
32
41
  latest = server_results[gem_name]
33
42
  return (latest and Gem::Version.new(latest) > Gem::Version.new(current_version))
@@ -36,7 +45,7 @@ module FastlaneCore
36
45
  def self.show_update_status(gem_name, current_version)
37
46
  fork do
38
47
  begin
39
- finished_running(gem_name)
48
+ send_completion_events_for(gem_name)
40
49
  rescue
41
50
  # we don't want to show a stack trace if something goes wrong
42
51
  end
@@ -102,38 +111,8 @@ module FastlaneCore
102
111
  UI.command("gem sources --add https://rubygems.org")
103
112
  end
104
113
 
105
- # Generate the URL on the main thread (since we're switching directory)
106
- def self.generate_fetch_url(gem_name)
107
- url = UPDATE_URL + gem_name
108
- params = {}
109
- params["ci"] = "1" if Helper.is_ci?
110
-
111
- project_hash = p_hash(ARGV, gem_name)
112
- params["p_hash"] = project_hash if project_hash
113
- params["platform"] = @platform if @platform # this has to be called after `p_hash`
114
-
115
- url += "?" + URI.encode_www_form(params) if params.count > 0
116
- return url
117
- end
118
-
119
- def self.fetch_latest(url)
120
- JSON.parse(Excon.post(url).body).fetch("version", nil)
121
- end
122
-
123
- def self.finished_running(gem_name)
124
- return if ENV["FASTLANE_OPT_OUT_USAGE"]
125
-
126
- time = (Time.now - @start_time).to_i
127
- url = UPDATE_URL + "time/#{gem_name}"
128
- url += "?time=#{time}"
129
- url += "&ci=1" if Helper.ci?
130
- url += "&gem=1" if Helper.rubygems?
131
- url += "&bundler=1" if Helper.bundler?
132
- url += "&mac_app=1" if Helper.mac_app?
133
- url += "&standalone=1" if Helper.contained_fastlane?
134
- url += "&homebrew=1" if Helper.homebrew?
135
-
136
- Excon.post(url)
114
+ def self.fetch_latest(gem_name)
115
+ JSON.parse(Excon.get("https://rubygems.org/api/v1/gems/#{gem_name}.json").body)["version"]
137
116
  end
138
117
 
139
118
  # (optional) Returns the app identifier for the current tool
@@ -187,7 +166,7 @@ module FastlaneCore
187
166
  end
188
167
 
189
168
  # To not count the same projects multiple time for the number of launches
190
- # More information: https://github.com/fastlane/refresher
169
+ # Learn more at https://github.com/fastlane/fastlane#metrics
191
170
  # Use the `FASTLANE_OPT_OUT_USAGE` variable to opt out
192
171
  # The resulting value is e.g. ce12f8371df11ef6097a83bdf2303e4357d6f5040acc4f76019489fa5deeae0d
193
172
  def self.p_hash(args, gem_name)
@@ -212,5 +191,166 @@ module FastlaneCore
212
191
  rescue
213
192
  return nil
214
193
  end
194
+
195
+ def self.send_launch_analytic_events_for(gem_name)
196
+ return if FastlaneCore::Env.truthy?("FASTLANE_OPT_OUT_USAGE")
197
+
198
+ ci = Helper.is_ci?.to_s
199
+ project_hash = p_hash(ARGV, gem_name)
200
+ p_hash = project_hash if project_hash
201
+ platform = @platform if @platform # this has to be called after `p_hash`
202
+
203
+ send_launch_analytic_events(p_hash, gem_name, platform, ci)
204
+ end
205
+
206
+ def self.send_launch_analytic_events(p_hash, tool, platform, ci)
207
+ timestamp_seconds = Time.now.to_i
208
+
209
+ analytics = []
210
+ analytics << event_for_p_hash(p_hash, tool, platform, timestamp_seconds) if p_hash
211
+ analytics << event_for_launch(tool, ci, timestamp_seconds)
212
+
213
+ send_events(analytics)
214
+ end
215
+
216
+ def self.event_for_p_hash(p_hash, tool, platform, timestamp_seconds)
217
+ {
218
+ event_source: {
219
+ oauth_app_name: 'fastlane-refresher',
220
+ product: 'fastlane'
221
+ },
222
+ actor: {
223
+ name: 'project',
224
+ detail: p_hash
225
+ },
226
+ action: {
227
+ name: 'update_checked'
228
+ },
229
+ primary_target: {
230
+ name: 'tool',
231
+ detail: tool || 'unknown'
232
+ },
233
+ secondary_target: {
234
+ name: 'platform',
235
+ detail: platform || 'unknown'
236
+ },
237
+ millis_since_epoch: timestamp_seconds * 1000,
238
+ version: 1
239
+ }
240
+ end
241
+
242
+ def self.event_for_launch(tool, ci, timestamp_seconds)
243
+ {
244
+ event_source: {
245
+ oauth_app_name: 'fastlane-refresher',
246
+ product: 'fastlane'
247
+ },
248
+ actor: {
249
+ name: 'tool',
250
+ detail: tool || 'unknown'
251
+ },
252
+ action: {
253
+ name: 'launched'
254
+ },
255
+ primary_target: {
256
+ name: 'ci',
257
+ detail: ci
258
+ },
259
+ millis_since_epoch: timestamp_seconds * 1000,
260
+ version: 1
261
+ }
262
+ end
263
+
264
+ def self.send_completion_events_for(gem_name)
265
+ return if FastlaneCore::Env.truthy?("FASTLANE_OPT_OUT_USAGE")
266
+
267
+ ci = Helper.is_ci?.to_s
268
+ install_method = if Helper.rubygems?
269
+ 'gem'
270
+ elsif Helper.bundler?
271
+ 'bundler'
272
+ elsif Helper.mac_app?
273
+ 'mac_app'
274
+ elsif Helper.contained_fastlane?
275
+ 'standalone'
276
+ elsif Helper.homebrew?
277
+ 'homebrew'
278
+ else
279
+ 'unknown'
280
+ end
281
+ duration = (Time.now - start_time).to_i
282
+ timestamp_seconds = Time.now.to_i
283
+
284
+ send_completion_events(gem_name, ci, install_method, duration, timestamp_seconds)
285
+ end
286
+
287
+ def self.send_events(analytics)
288
+ analytic_event_body = { analytics: analytics }.to_json
289
+
290
+ url = ENV["FASTLANE_METRICS_URL"] || "https://fastlane-metrics.fabric.io/public"
291
+ Excon.post(url,
292
+ body: analytic_event_body,
293
+ headers: { "Content-Type" => 'application/json' })
294
+ end
295
+
296
+ def self.event_for_completion(tool, ci, duration, timestamp_seconds)
297
+ {
298
+ event_source: {
299
+ oauth_app_name: 'fastlane-refresher',
300
+ product: 'fastlane'
301
+ },
302
+ actor: {
303
+ name: 'tool',
304
+ detail: tool || 'unknown'
305
+ },
306
+ action: {
307
+ name: 'completed_with_duration'
308
+ },
309
+ primary_target: {
310
+ name: 'duration',
311
+ detail: duration.to_s
312
+ },
313
+ secondary_target: {
314
+ name: 'ci',
315
+ detail: ci
316
+ },
317
+ millis_since_epoch: timestamp_seconds * 1000,
318
+ version: 1
319
+ }
320
+ end
321
+
322
+ def self.event_for_install_method(tool, ci, install_method, timestamp_seconds)
323
+ {
324
+ event_source: {
325
+ oauth_app_name: 'fastlane-refresher',
326
+ product: 'fastlane'
327
+ },
328
+ actor: {
329
+ name: 'tool',
330
+ detail: tool || 'unknown'
331
+ },
332
+ action: {
333
+ name: 'completed_with_install_method'
334
+ },
335
+ primary_target: {
336
+ name: 'install_method',
337
+ detail: install_method
338
+ },
339
+ secondary_target: {
340
+ name: 'ci',
341
+ detail: ci
342
+ },
343
+ millis_since_epoch: timestamp_seconds * 1000,
344
+ version: 1
345
+ }
346
+ end
347
+
348
+ def self.send_completion_events(tool, ci, install_method, duration, timestamp_seconds)
349
+ analytics = []
350
+ analytics << event_for_completion(tool, ci, duration, timestamp_seconds)
351
+ analytics << event_for_install_method(tool, ci, install_method, timestamp_seconds)
352
+
353
+ send_events(analytics)
354
+ end
215
355
  end
216
356
  end
data/gym/README.md CHANGED
@@ -54,7 +54,7 @@ Get in contact with the developer on Twitter: [@FastlaneTools](https://twitter.c
54
54
 
55
55
  # What's gym?
56
56
 
57
- `gym` builds and packages iOS and macOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file :muscle:
57
+ `gym` builds and packages iOS apps for you. It takes care of all the heavy lifting and makes it super easy to generate a signed `ipa` or `app` file :muscle:
58
58
 
59
59
  `gym` is a replacement for [shenzhen](https://github.com/nomad/shenzhen).
60
60
 
@@ -1,14 +1,23 @@
1
1
  module Match
2
2
  class GitHelper
3
- def self.clone(git_url, shallow_clone, manual_password: nil, skip_docs: false, branch: "master", git_full_name: nil, git_user_email: nil)
3
+ def self.clone(git_url, shallow_clone, manual_password: nil, skip_docs: false, branch: "master", git_full_name: nil, git_user_email: nil, clone_branch_directly: false)
4
4
  return @dir if @dir
5
5
 
6
6
  @dir = Dir.mktmpdir
7
7
 
8
8
  command = "git clone '#{git_url}' '#{@dir}'"
9
- command << " --depth 1 --no-single-branch" if shallow_clone
9
+ if shallow_clone
10
+ command << " --depth 1 --no-single-branch"
11
+ elsif clone_branch_directly
12
+ command += " -b #{branch.shellescape} --single-branch"
13
+ end
10
14
 
11
15
  UI.message "Cloning remote git repo..."
16
+
17
+ if branch && !clone_branch_directly
18
+ UI.message("If cloning the repo takes too long, you can use the `clone_branch_directly` option in match.")
19
+ end
20
+
12
21
  begin
13
22
  # GIT_TERMINAL_PROMPT will fail the `git clone` command if user credentials are missing
14
23
  FastlaneCore::CommandExecutor.execute(command: "GIT_TERMINAL_PROMPT=0 #{command}",
@@ -106,6 +106,11 @@ module Match
106
106
  description: "Make a shallow clone of the repository (truncate the history to 1 revision)",
107
107
  is_string: false,
108
108
  default_value: false),
109
+ FastlaneCore::ConfigItem.new(key: :clone_branch_directly,
110
+ env_name: "MATCH_CLONE_BRANCH_DIRECTLY",
111
+ description: "Clone just the branch specified, instead of the whole repo. This requires that the branch already exists. Otherwise the command will fail",
112
+ is_string: false,
113
+ default_value: false),
109
114
  FastlaneCore::ConfigItem.new(key: :workspace,
110
115
  description: nil,
111
116
  verify_block: proc do |value|
@@ -8,7 +8,13 @@ module Match
8
8
  hide_keys: [:workspace],
9
9
  title: "Summary for match #{Fastlane::VERSION}")
10
10
 
11
- params[:workspace] = GitHelper.clone(params[:git_url], params[:shallow_clone], skip_docs: params[:skip_docs], branch: params[:git_branch], git_full_name: params[:git_full_name], git_user_email: params[:git_user_email])
11
+ params[:workspace] = GitHelper.clone(params[:git_url],
12
+ params[:shallow_clone],
13
+ skip_docs: params[:skip_docs],
14
+ branch: params[:git_branch],
15
+ git_full_name: params[:git_full_name],
16
+ git_user_email: params[:git_user_email],
17
+ clone_branch_directly: params[:clone_branch_directly])
12
18
 
13
19
  unless params[:readonly]
14
20
  self.spaceship = SpaceshipEnsure.new(params[:username])
@@ -35,7 +35,7 @@ module Pilot
35
35
  end
36
36
 
37
37
  UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
38
- latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform)
38
+ latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform, poll_interval: config[:wait_processing_interval])
39
39
 
40
40
  distribute(options, build: latest_build)
41
41
  end
@@ -313,9 +313,9 @@ module Spaceship
313
313
 
314
314
  # Private methods
315
315
  def setup
316
- # Properly parse the AppStatus
317
316
  status = raw_data['status']
318
317
  @app_status = Tunes::AppStatus.get_from_string(status)
318
+
319
319
  setup_large_app_icon
320
320
  setup_watch_app_icon
321
321
  setup_transit_app_file if supports_app_transit?
@@ -592,8 +592,24 @@ module Spaceship
592
592
  end
593
593
 
594
594
  def setup_screenshots
595
- @screenshots = {}
595
+ # Enable Scaling for all screen sizes that don't have at least one screenshot
596
+ # We automatically disable scaling once we upload at least one screenshot
597
+ language_details = raw_data_details.each do |current_language|
598
+ language_details = (current_language["displayFamilies"] || {})["value"]
599
+ (language_details || []).each do |device_language_details|
600
+ next if device_language_details["screenshots"].nil?
601
+ next if device_language_details["screenshots"]["value"].count > 0
602
+
603
+ # The current row includes screenshots for all device types
604
+ # so we need to enable scaling for both iOS and watchOS apps
605
+ device_language_details["scaled"]["value"] = true if device_language_details["scaled"]
606
+ device_language_details["messagesScaled"]["value"] = true if device_language_details["messagesScaled"]
607
+ # we unset `scaled` or `messagesScaled` as soon as we upload a
608
+ # screenshot for this device/language combination
609
+ end
610
+ end
596
611
 
612
+ @screenshots = {}
597
613
  raw_data_details.each do |row|
598
614
  # Now that's one language right here
599
615
  @screenshots[row['language']] = setup_screenshots_for(row) + setup_messages_screenshots_for(row)
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: 2.29.0.beta.20170508010014
4
+ version: 2.29.0.beta.20170509010055
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: 2017-05-08 00:00:00.000000000 Z
18
+ date: 2017-05-09 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1357,23 +1357,23 @@ metadata:
1357
1357
  post_install_message:
1358
1358
  rdoc_options: []
1359
1359
  require_paths:
1360
- - credentials_manager/lib
1361
- - pilot/lib
1362
- - deliver/lib
1363
- - match/lib
1364
- - snapshot/lib
1365
1360
  - produce/lib
1361
+ - gym/lib
1366
1362
  - spaceship/lib
1367
- - frameit/lib
1368
- - screengrab/lib
1363
+ - sigh/lib
1369
1364
  - pem/lib
1370
- - gym/lib
1371
- - fastlane_core/lib
1365
+ - match/lib
1366
+ - cert/lib
1367
+ - credentials_manager/lib
1368
+ - screengrab/lib
1372
1369
  - fastlane/lib
1373
1370
  - supply/lib
1371
+ - snapshot/lib
1372
+ - pilot/lib
1373
+ - fastlane_core/lib
1374
+ - deliver/lib
1375
+ - frameit/lib
1374
1376
  - scan/lib
1375
- - cert/lib
1376
- - sigh/lib
1377
1377
  required_ruby_version: !ruby/object:Gem::Requirement
1378
1378
  requirements:
1379
1379
  - - ">="