fastlane 2.62.0.beta.20171011010003 → 2.62.0.beta.20171014010003

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: 655de0a004eb58da525ad4be8ba304ed511dd7f5
4
- data.tar.gz: 95be51a8bb6933d1c8336c93b33fcbbc0f5bdec4
3
+ metadata.gz: 91e35cb694e77c43f4022a94f6f396d865cd5f38
4
+ data.tar.gz: e30e419e22a2a08246c78471501cd5cc692afab2
5
5
  SHA512:
6
- metadata.gz: e20f511b4c826b6d54f7d9065566c8b4fb01239a4a3546a6df2bea2876437d9a51706d4f551b14f2e62a4b66ecc381f70666f8005a9809d199231e7f5b521685
7
- data.tar.gz: 735e7a2cc2bdec2c4d8dc3425cd3ec59e99049adf0fc268c965ff2ec85ff56fb15ec2b6a563d3c4c4a41109d3e2d2502f2091df3762ea820cfbdc7d0080f2f39
6
+ metadata.gz: 99433dbfc2df4a93fe63021e255f178e0e92f1a6a7183403e2de90157f01557393669eba37b7edd249f9a96cd8e62790b9d97261a09af2bf0c5668cbc4ad04a4
7
+ data.tar.gz: e99633444490b704bcff01ceec19c5b9cb5875e1a7ff81f144d6c1e47488535c4b4852878df25b88d6203cb42325e5d4d0766104086813d048337139f2259d22
@@ -1,6 +1,6 @@
1
1
  ###################### More Options ######################
2
2
  # If you want to have even more control, check out the documentation
3
- # https://github.com/fastlane/fastlane/blob/master/deliver/Deliverfile.md
3
+ # https://docs.fastlane.tools/actions/deliver
4
4
 
5
5
 
6
6
  ###################### Automatically generated ######################
@@ -181,10 +181,12 @@ module Deliver
181
181
  verify_block: proc do |value|
182
182
  ENV["FASTLANE_TEAM_NAME"] = value.to_s
183
183
  end),
184
+ # rubocop:disable Metrics/LineLength
184
185
  FastlaneCore::ConfigItem.new(key: :itc_provider,
185
186
  env_name: "DELIVER_ITC_PROVIDER",
186
- description: "The provider short name to be used with the iTMSTransporter to identify your team",
187
+ description: "The provider short name to be used with the iTMSTransporter to identify your team. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
187
188
  optional: true),
189
+ # rubocop:enable Metrics/LineLength
188
190
  FastlaneCore::ConfigItem.new(key: :overwrite_screenshots,
189
191
  env_name: "DELIVER_OVERWRITE_SCREENSHOTS",
190
192
  description: "Clear all previously uploaded screenshots before uploading the new ones",
@@ -250,13 +250,13 @@ _match_ can even use the same one Git repository for all bundle identifiers.
250
250
 
251
251
  ### Setup Xcode project
252
252
 
253
- [Docs on how to set up your Xcode project](https://docs.fastlane.tools/codesigning/XcodeProject/)
253
+ [Docs on how to set up your Xcode project](/codesigning/xcode-project/)
254
254
 
255
255
  #### To build from the command line using [fastlane](https://fastlane.tools)
256
256
 
257
257
  _match_ automatically pre-fills environment variables with the UUIDs of the correct provisioning profiles, ready to be used in your Xcode project.
258
258
 
259
- More information about how to setup your Xcode project can be found [here](https://docs.fastlane.tools/codesigning/XcodeProject/)
259
+ More information about how to setup your Xcode project can be found [here](/codesigning/xcode-project/)
260
260
 
261
261
  #### To build from Xcode manually
262
262
 
@@ -264,7 +264,7 @@ This is useful when installing your application on your device using the Develop
264
264
 
265
265
  You can statically select the right provisioning profile in your Xcode project (the name will be `match Development tools.fastlane.app`).
266
266
 
267
- [Docs on how to set up your Xcode project](/codesigning/xcode-project/.md)
267
+ [Docs on how to set up your Xcode project](/codesigning/xcode-project/)
268
268
 
269
269
  ### Continuous Integration
270
270
 
@@ -91,7 +91,7 @@ Here a few links to get started:
91
91
  - In your UI Test class, click the `Record` button on the bottom left and record your interaction
92
92
  - To take a snapshot, call the following between interactions
93
93
  - Swift: `snapshot("01LoginScreen")`
94
- - Objective C: `[Snapshot snapshot:@"01LoginScreen" waitForLoadingIndicator:YES];`
94
+ - Objective C: `[Snapshot snapshot:@"01LoginScreen" timeWaitingForIdle:10];`
95
95
  - Add the following code to your `setUp()` method
96
96
 
97
97
  **Swift**
@@ -119,7 +119,7 @@ module Fastlane
119
119
  else
120
120
 
121
121
  if build_file.nil?
122
- UI.user_error!("You have to provide a build file")
122
+ UI.user_error!("You have to provide a build file (params 'apk' or 'ipa')")
123
123
  end
124
124
 
125
125
  if options[:ipa].to_s.end_with?(".ipa")
@@ -18,6 +18,11 @@ module Fastlane
18
18
  command << " --sources='#{sources}'"
19
19
  end
20
20
 
21
+ if params[:swift_version]
22
+ swift_version = params[:swift_version]
23
+ command << " --swift-version=#{swift_version}"
24
+ end
25
+
21
26
  if params[:allow_warnings]
22
27
  command << " --allow-warnings"
23
28
  end
@@ -74,6 +79,10 @@ module Fastlane
74
79
  verify_block: proc do |value|
75
80
  UI.user_error!("Sources must be an array.") unless value.kind_of?(Array)
76
81
  end),
82
+ FastlaneCore::ConfigItem.new(key: :swift_version,
83
+ description: "The SWIFT_VERSION that should be used to lint the spec. This takes precedence over a .swift-version file",
84
+ optional: true,
85
+ is_string: false),
77
86
  FastlaneCore::ConfigItem.new(key: :verbose,
78
87
  description: "Show more debugging information",
79
88
  optional: true,
@@ -32,6 +32,7 @@ module Fastlane
32
32
  FastlaneCore::ConfigItem.new(key: :path,
33
33
  env_name: "FL_PROJECT_SIGNING_PROJECT_PATH",
34
34
  description: "Path to your Xcode project",
35
+ default_value: Dir['*.xcodeproj'].first,
35
36
  verify_block: proc do |value|
36
37
  UI.user_error!("Path is invalid") unless File.exist?(value)
37
38
  end),
@@ -52,6 +53,7 @@ module Fastlane
52
53
 
53
54
  def self.example_code
54
55
  [
56
+ 'update_project_team',
55
57
  'update_project_team(
56
58
  path: "Example.xcodeproj",
57
59
  teamid: "A3ZZVJ7CNY"
@@ -83,7 +83,9 @@ module Fastlane
83
83
  command << "-p #{params[:platform] == 'appletvos' ? 'tvos' : params[:platform]}"
84
84
  command << File.expand_path(path).shellescape
85
85
  begin
86
- Actions.sh(command.join(" "), log: false)
86
+ command_to_execute = command.join(" ")
87
+ UI.verbose("upload_dsym using command: #{command_to_execute}")
88
+ Actions.sh(command_to_execute, log: false)
87
89
  rescue => ex
88
90
  UI.error ex.to_s # it fails, however we don't want to fail everything just for this
89
91
  end
@@ -96,6 +98,7 @@ module Fastlane
96
98
  next unless result
97
99
  next unless result.kind_of?(Hash)
98
100
  params[:api_token] ||= result["APIKey"]
101
+ UI.verbose("found an APIKey in #{current}")
99
102
  end
100
103
  end
101
104
  UI.user_error!("Please provide an api_token using api_token:") unless params[:api_token]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.62.0.beta.20171011010003'.freeze
2
+ VERSION = '2.62.0.beta.20171014010003'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  end
@@ -65,9 +65,11 @@ module Gym
65
65
  Gym.config[:export_options] ||= {}
66
66
  hash_to_use = (Gym.config[:export_options][:provisioningProfiles] || {}).dup || {} # dup so we can show the original values in `verbose` mode
67
67
 
68
- mapping_object = CodeSigningMapping.new(project: Gym.project)
69
- hash_to_use = mapping_object.merge_profile_mapping(primary_mapping: hash_to_use,
68
+ unless Gym.config[:skip_profile_detection]
69
+ mapping_object = CodeSigningMapping.new(project: Gym.project)
70
+ hash_to_use = mapping_object.merge_profile_mapping(primary_mapping: hash_to_use,
70
71
  export_method: Gym.config[:export_method])
72
+ end
71
73
 
72
74
  return if hash_to_use.count == 0 # We don't want to set a mapping if we don't have one
73
75
  Gym.config[:export_options][:provisioningProfiles] = hash_to_use
@@ -31,6 +31,7 @@ module Gym
31
31
  options << "-exportPath '#{temporary_output_path}'"
32
32
  options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain]
33
33
  options << config[:export_xcargs] if config[:export_xcargs]
34
+ options << config[:xcargs] if config[:xcargs]
34
35
 
35
36
  options
36
37
  end
@@ -234,7 +234,13 @@ module Gym
234
234
  env_name: "XCPRETTY_UTF",
235
235
  description: "Have xcpretty use unicode encoding when reporting builds",
236
236
  optional: true,
237
- is_string: false)
237
+ is_string: false),
238
+ FastlaneCore::ConfigItem.new(key: :skip_profile_detection,
239
+ env_name: "GYM_SKIP_PROFILE_DETECTION",
240
+ description: "Do not try to build a profile mapping from the xcodeproj. Match or a manually provided mapping should be used",
241
+ optional: true,
242
+ is_string: false,
243
+ default_value: false)
238
244
  ]
239
245
  end
240
246
  end
@@ -144,10 +144,12 @@ module Pilot
144
144
  verify_block: proc do |value|
145
145
  ENV["FASTLANE_TEAM_ID"] = value.to_s
146
146
  end),
147
+ # rubocop:disable Metrics/LineLength
147
148
  FastlaneCore::ConfigItem.new(key: :itc_provider,
148
149
  env_name: "PILOT_ITC_PROVIDER",
149
- description: "The provider short name to be used with the iTMSTransporter to identify your team",
150
+ description: "The provider short name to be used with the iTMSTransporter to identify your team. To get provider short name run `pathToXcode.app/Contents/Applications/Application\\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -u 'USERNAME' -p 'PASSWORD' -account_type itunes_connect -v off`. The short names of providers should be listed in the second column",
150
151
  optional: true),
152
+ # rubocop:enable Metrics/LineLength
151
153
  FastlaneCore::ConfigItem.new(key: :groups,
152
154
  short_option: "-g",
153
155
  env_name: "PILOT_GROUPS",
@@ -19,17 +19,23 @@ import XCTest
19
19
  var deviceLanguage = ""
20
20
  var locale = ""
21
21
 
22
- @available(*, deprecated, message: "use setupSnapshot: instead")
23
- func setLanguage(_ app: XCUIApplication) {
24
- setupSnapshot(app)
25
- }
26
-
27
22
  func setupSnapshot(_ app: XCUIApplication) {
28
23
  Snapshot.setupSnapshot(app)
29
24
  }
30
25
 
31
- func snapshot(_ name: String, waitForLoadingIndicator: Bool = true) {
32
- Snapshot.snapshot(name, waitForLoadingIndicator: waitForLoadingIndicator)
26
+ func snapshot(_ name: String, waitForLoadingIndicator: Bool) {
27
+ if waitForLoadingIndicator {
28
+ Snapshot.snapshot(name)
29
+ } else {
30
+ Snapshot.snapshot(name, timeWaitingForIdle: 0)
31
+ }
32
+ }
33
+
34
+ /// - Parameters:
35
+ /// - name: The name of the snapshot
36
+ /// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait.
37
+ func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) {
38
+ Snapshot.snapshot(name, timeWaitingForIdle: timeout)
33
39
  }
34
40
 
35
41
  enum SnapshotError: Error, CustomDebugStringConvertible {
@@ -37,7 +43,7 @@ enum SnapshotError: Error, CustomDebugStringConvertible {
37
43
  case cannotFindHomeDirectory
38
44
  case cannotFindSimulatorHomeDirectory
39
45
  case cannotAccessSimulatorHomeDirectory(String)
40
-
46
+
41
47
  var debugDescription: String {
42
48
  switch self {
43
49
  case .cannotDetectUser:
@@ -116,9 +122,9 @@ open class Snapshot: NSObject {
116
122
  }
117
123
  }
118
124
 
119
- open class func snapshot(_ name: String, waitForLoadingIndicator: Bool = true) {
120
- if waitForLoadingIndicator {
121
- waitForLoadingIndicatorToDisappear()
125
+ open class func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) {
126
+ if timeout > 0 {
127
+ waitForLoadingIndicatorToDisappear(within: timeout)
122
128
  }
123
129
 
124
130
  print("snapshot: \(name)") // more information about this, check out https://github.com/fastlane/fastlane/tree/master/snapshot#how-does-it-work
@@ -140,17 +146,14 @@ open class Snapshot: NSObject {
140
146
  #endif
141
147
  }
142
148
 
143
- class func waitForLoadingIndicatorToDisappear() {
149
+ class func waitForLoadingIndicatorToDisappear(within timeout: TimeInterval) {
144
150
  #if os(tvOS)
145
151
  return
146
152
  #endif
147
153
 
148
- let query = XCUIApplication().statusBars.children(matching: .other).element(boundBy: 1).children(matching: .other)
149
-
150
- while (0..<query.count).map({ query.element(boundBy: $0) }).contains(where: { $0.isLoadingIndicator }) {
151
- sleep(1)
152
- print("Waiting for loading indicator to disappear...")
153
- }
154
+ let networkLoadingIndicator = XCUIApplication().otherElements.deviceStatusBars.networkLoadingIndicators.element
155
+ let networkLoadingIndicatorDisappeared = XCTNSPredicateExpectation(predicate: NSPredicate(format: "exists == false"), object: networkLoadingIndicator)
156
+ XCTWaiter.wait(for: [networkLoadingIndicatorDisappeared], timeout: timeout)
154
157
  }
155
158
 
156
159
  class func pathPrefix() throws -> URL? {
@@ -180,16 +183,63 @@ open class Snapshot: NSObject {
180
183
  }
181
184
  }
182
185
 
183
- extension XCUIElement {
184
- var isLoadingIndicator: Bool {
185
- let whiteListedLoaders = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]
186
- if whiteListedLoaders.contains(self.identifier) {
187
- return false
186
+ private extension XCUIElementAttributes {
187
+ var isNetworkLoadingIndicator: Bool {
188
+ if hasWhiteListedIdentifier { return false }
189
+
190
+ let hasOldLoadingIndicatorSize = frame.size == CGSize(width: 10, height: 20)
191
+ let hasNewLoadingIndicatorSize = frame.size.width.isBetween(46, and: 47) && frame.size.height.isBetween(2, and: 3)
192
+
193
+ return hasOldLoadingIndicatorSize || hasNewLoadingIndicatorSize
194
+ }
195
+
196
+ var hasWhiteListedIdentifier: Bool {
197
+ let whiteListedIdentifiers = ["GeofenceLocationTrackingOn", "StandardLocationTrackingOn"]
198
+
199
+ return whiteListedIdentifiers.contains(identifier)
200
+ }
201
+
202
+ func isStatusBar(_ deviceWidth: CGFloat) -> Bool {
203
+ if elementType == .statusBar { return true }
204
+ guard frame.origin == .zero else { return false }
205
+
206
+ let oldStatusBarSize = CGSize(width: deviceWidth, height: 20)
207
+ let newStatusBarSize = CGSize(width: deviceWidth, height: 44)
208
+
209
+ return [oldStatusBarSize, newStatusBarSize].contains(frame.size)
210
+ }
211
+ }
212
+
213
+ private extension XCUIElementQuery {
214
+ var networkLoadingIndicators: XCUIElementQuery {
215
+ let isNetworkLoadingIndicator = NSPredicate { (evaluatedObject, _) in
216
+ guard let element = evaluatedObject as? XCUIElementAttributes else { return false }
217
+
218
+ return element.isNetworkLoadingIndicator
188
219
  }
189
- return self.frame.size == CGSize(width: 10, height: 20)
220
+
221
+ return self.containing(isNetworkLoadingIndicator)
222
+ }
223
+
224
+ var deviceStatusBars: XCUIElementQuery {
225
+ let deviceWidth = XCUIApplication().frame.width
226
+
227
+ let isStatusBar = NSPredicate { (evaluatedObject, _) in
228
+ guard let element = evaluatedObject as? XCUIElementAttributes else { return false }
229
+
230
+ return element.isStatusBar(deviceWidth)
231
+ }
232
+
233
+ return self.containing(isStatusBar)
234
+ }
235
+ }
236
+
237
+ private extension CGFloat {
238
+ func isBetween(_ numberA: CGFloat, and numberB: CGFloat) -> Bool {
239
+ return numberA...numberB ~= self
190
240
  }
191
241
  }
192
242
 
193
243
  // Please don't remove the lines below
194
244
  // They are used to detect outdated configuration files
195
- // SnapshotHelperVersion [1.5]
245
+ // SnapshotHelperVersion [1.6]
@@ -111,6 +111,30 @@ module Spaceship
111
111
  send_shared_login_request(user, password)
112
112
  end
113
113
 
114
+ # Sometimes we get errors or info nested in our data
115
+ # This method allows you to pass in a set of keys to check for
116
+ # along with the name of the sub_section of your original data
117
+ # where we should check
118
+ # Returns a mapping of keys to data array if we find anything, otherwise, empty map
119
+ def fetch_errors_in_data(data_section: nil, sub_section_name: nil, keys: nil)
120
+ if data_section && sub_section_name
121
+ sub_section = data_section[sub_section_name]
122
+ else
123
+ sub_section = data_section
124
+ end
125
+
126
+ unless sub_section
127
+ return {}
128
+ end
129
+
130
+ error_map = {}
131
+ keys.each do |key|
132
+ errors = sub_section.fetch(key, [])
133
+ error_map[key] = errors if errors.count > 0
134
+ end
135
+ return error_map
136
+ end
137
+
114
138
  # rubocop:disable Metrics/PerceivedComplexity
115
139
  # If the response is coming from a flaky api, set flaky_api_call to true so we retry a little.
116
140
  # Patience is a virtue.
@@ -119,12 +143,17 @@ module Spaceship
119
143
  return unless raw.kind_of? Hash
120
144
 
121
145
  data = raw['data'] || raw # sometimes it's with data, sometimes it isn't
146
+ error_keys_to_check = [
147
+ "sectionErrorKeys",
148
+ "sectionInfoKeys",
149
+ "sectionWarningKeys",
150
+ "validationErrors"
151
+ ]
152
+ errors_in_data = fetch_errors_in_data(data_section: data, keys: error_keys_to_check)
153
+ errors_in_version_info = fetch_errors_in_data(data_section: data, sub_section_name: "versionInfo", keys: error_keys_to_check)
122
154
 
123
- if data.fetch('sectionErrorKeys', []).count == 0 and
124
- data.fetch('sectionInfoKeys', []).count == 0 and
125
- data.fetch('sectionWarningKeys', []).count == 0 and
126
- data.fetch('validationErrors', []).count == 0
127
-
155
+ # If we have any errors or "info" we need to treat them as warnings or errors
156
+ if errors_in_data.count == 0 && errors_in_version_info.count == 0
128
157
  logger.debug("Request was successful")
129
158
  end
130
159
 
@@ -154,8 +183,15 @@ module Spaceship
154
183
  end
155
184
 
156
185
  errors = handle_response_hash.call(data)
157
- errors += data.fetch('sectionErrorKeys', [])
158
- errors += data.fetch('validationErrors', [])
186
+
187
+ # Search at data level, as well as "versionInfo" level for errors
188
+ error_keys = ["sectionErrorKeys", "validationErrors"]
189
+ errors_in_data = fetch_errors_in_data(data_section: data, keys: error_keys)
190
+ errors_in_version_info = fetch_errors_in_data(data_section: data, sub_section_name: "versionInfo", keys: error_keys)
191
+
192
+ errors += errors_in_data.values if errors_in_data.values
193
+ errors += errors_in_version_info.values if errors_in_version_info.values
194
+ errors = errors.flat_map { |value| value }
159
195
 
160
196
  # Sometimes there is a different kind of error in the JSON response
161
197
  # e.g. {"warn"=>nil, "error"=>["operation_failed"], "info"=>nil}
@@ -177,8 +213,18 @@ module Spaceship
177
213
  end
178
214
  end
179
215
 
180
- puts data['sectionInfoKeys'] if data['sectionInfoKeys']
181
- puts data['sectionWarningKeys'] if data['sectionWarningKeys']
216
+ # Search at data level, as well as "versionInfo" level for info and warnings
217
+ info_keys = ["sectionInfoKeys", "sectionWarningKeys"]
218
+ info_in_data = fetch_errors_in_data(data_section: data, keys: info_keys)
219
+ info_in_version_info = fetch_errors_in_data(data_section: data, sub_section_name: "versionInfo", keys: info_keys)
220
+
221
+ info_in_data.each do |info_key, info_value|
222
+ puts(info_value)
223
+ end
224
+
225
+ info_in_version_info.each do |info_key, info_value|
226
+ puts(info_value)
227
+ end
182
228
 
183
229
  return data
184
230
  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: 2.62.0.beta.20171011010003
4
+ version: 2.62.0.beta.20171014010003
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-10-11 00:00:00.000000000 Z
18
+ date: 2017-10-14 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1497,24 +1497,24 @@ metadata:
1497
1497
  post_install_message:
1498
1498
  rdoc_options: []
1499
1499
  require_paths:
1500
- - spaceship/lib
1501
- - scan/lib
1500
+ - supply/lib
1501
+ - screengrab/lib
1502
+ - match/lib
1503
+ - precheck/lib
1502
1504
  - sigh/lib
1505
+ - produce/lib
1506
+ - scan/lib
1507
+ - gym/lib
1503
1508
  - snapshot/lib
1504
- - screengrab/lib
1509
+ - frameit/lib
1505
1510
  - fastlane/lib
1506
1511
  - cert/lib
1507
- - pem/lib
1508
- - gym/lib
1509
- - produce/lib
1510
- - deliver/lib
1511
- - supply/lib
1512
- - match/lib
1513
- - frameit/lib
1514
- - credentials_manager/lib
1515
1512
  - pilot/lib
1516
- - precheck/lib
1513
+ - spaceship/lib
1514
+ - credentials_manager/lib
1515
+ - deliver/lib
1517
1516
  - fastlane_core/lib
1517
+ - pem/lib
1518
1518
  required_ruby_version: !ruby/object:Gem::Requirement
1519
1519
  requirements:
1520
1520
  - - ">="