fastlane 2.145.0 → 2.146.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -84
  3. data/credentials_manager/lib/credentials_manager/appfile_config.rb +4 -0
  4. data/deliver/lib/deliver/app_screenshot.rb +1 -0
  5. data/deliver/lib/deliver/options.rb +4 -1
  6. data/deliver/lib/deliver/setup.rb +4 -4
  7. data/{frameit/lib/frameit/.screenshot.rb.swp → fastlane/lib/fastlane/actions/.update_code_signing_settings.rb.swp} +0 -0
  8. data/fastlane/lib/fastlane/actions/create_pull_request.rb +7 -1
  9. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +10 -4
  10. data/fastlane/lib/fastlane/actions/setup_jenkins.rb +11 -2
  11. data/fastlane/lib/fastlane/actions/update_code_signing_settings.rb +57 -49
  12. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -1
  13. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +13 -8
  14. data/fastlane/lib/fastlane/version.rb +1 -1
  15. data/fastlane/swift/Deliverfile.swift +1 -1
  16. data/fastlane/swift/Fastlane.swift +35 -2
  17. data/fastlane/swift/Gymfile.swift +1 -1
  18. data/fastlane/swift/Matchfile.swift +1 -1
  19. data/fastlane/swift/Precheckfile.swift +1 -1
  20. data/fastlane/swift/Scanfile.swift +1 -1
  21. data/fastlane/swift/Screengrabfile.swift +1 -1
  22. data/fastlane/swift/Snapshotfile.swift +1 -1
  23. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +9 -0
  24. data/fastlane_core/lib/fastlane_core/device_manager.rb +2 -2
  25. data/frameit/lib/frameit/editor.rb +1 -1
  26. data/frameit/lib/frameit/screenshot.rb +4 -0
  27. data/match/lib/match/importer.rb +2 -0
  28. data/match/lib/match/storage/s3_storage.rb +10 -5
  29. data/pilot/lib/pilot/build_manager.rb +15 -4
  30. data/pilot/lib/pilot/options.rb +8 -0
  31. data/produce/lib/produce/developer_center.rb +11 -2
  32. data/produce/lib/produce/itunes_connect.rb +11 -3
  33. data/produce/lib/produce/options.rb +12 -0
  34. data/screengrab/lib/screengrab/runner.rb +1 -1
  35. data/snapshot/lib/snapshot/reports_generator.rb +4 -0
  36. data/spaceship/lib/spaceship/portal/app_service.rb +2 -2
  37. data/spaceship/lib/spaceship/tunes/application.rb +2 -1
  38. data/spaceship/lib/spaceship/tunes/tunes_client.rb +2 -2
  39. data/supply/lib/supply/setup.rb +5 -3
  40. metadata +18 -20
  41. data/fastlane/lib/fastlane/actions/.push_to_git_remote.rb.swp +0 -0
  42. data/spaceship/lib/spaceship/portal/.portal_client.rb.swp +0 -0
@@ -130,7 +130,7 @@ module Fastlane
130
130
  end
131
131
 
132
132
  def self.find_binary_path(params)
133
- params[:binary_path] ||= (Dir["/Applications/Fabric.app/**/upload-symbols"] + Dir["./Pods/**/upload-symbols"]).last
133
+ params[:binary_path] ||= (Dir["/Applications/Fabric.app/**/upload-symbols"] + Dir["./Pods/Fabric/upload-symbols"] + Dir["./Pods/FirebaseCrashlytics/upload-symbols"]).last
134
134
  UI.user_error!("Failed to find Fabric's upload_symbols binary at /Applications/Fabric.app/**/upload-symbols or ./Pods/**/upload-symbols. Please specify the location of the binary explicitly by using the binary_path option") unless params[:binary_path]
135
135
 
136
136
  params[:binary_path] = File.expand_path(params[:binary_path])
@@ -7,16 +7,14 @@ module Fastlane
7
7
 
8
8
  def initialize(access_key: nil, secret_access_key: nil, region: nil)
9
9
  creds = Aws::Credentials.new(access_key, secret_access_key)
10
- Aws.config.update({
10
+ Aws.config.update(
11
11
  region: region,
12
12
  credentials: creds
13
- })
14
-
15
- @client = Aws::S3::Client.new
13
+ )
16
14
  end
17
15
 
18
16
  def list_buckets
19
- return @client.list_buckets
17
+ return client.list_buckets
20
18
  end
21
19
 
22
20
  def upload_file(bucket_name, file_name, file_data, acl)
@@ -40,17 +38,24 @@ module Fastlane
40
38
  obj.public_url.to_s
41
39
  end
42
40
 
43
- def delete_file(bucket, file_name)
41
+ def delete_file(bucket_name, file_name)
44
42
  bucket = find_bucket!(bucket_name)
45
- bucket.objects[file_name].delete
43
+ file = bucket.object(file_name)
44
+ file.delete
46
45
  end
47
46
 
48
47
  def find_bucket!(bucket_name)
49
- bucket = Aws::S3::Bucket.new(bucket_name, client: @client)
48
+ bucket = Aws::S3::Bucket.new(bucket_name, client: client)
50
49
  raise "Bucket '#{bucket_name}' not found" unless bucket.exists?
51
50
 
52
51
  return bucket
53
52
  end
54
53
  end
54
+
55
+ private
56
+
57
+ def client
58
+ @client ||= Aws::S3::Client.new
59
+ end
55
60
  end
56
61
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.145.0'.freeze
2
+ VERSION = '2.146.0'.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
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -18,4 +18,4 @@ class Deliverfile: DeliverfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -2215,6 +2215,7 @@ func createAppOnManagedPlayStore(jsonKey: String? = nil,
2215
2215
  - appVersion: Initial version number (e.g. '1.0')
2216
2216
  - sku: SKU Number (e.g. '1234')
2217
2217
  - platform: The platform to use (optional)
2218
+ - platforms: The platforms to use (optional)
2218
2219
  - language: Primary Language (e.g. 'English', 'German')
2219
2220
  - companyName: The name of your company. Only required if it's the first app you create
2220
2221
  - skipItc: Skip the creation of the app on App Store Connect
@@ -2238,6 +2239,7 @@ func createAppOnline(username: String,
2238
2239
  appVersion: String? = nil,
2239
2240
  sku: String,
2240
2241
  platform: String = "ios",
2242
+ platforms: [String]? = nil,
2241
2243
  language: String = "English",
2242
2244
  companyName: String? = nil,
2243
2245
  skipItc: Bool = false,
@@ -2256,6 +2258,7 @@ func createAppOnline(username: String,
2256
2258
  RubyCommand.Argument(name: "app_version", value: appVersion),
2257
2259
  RubyCommand.Argument(name: "sku", value: sku),
2258
2260
  RubyCommand.Argument(name: "platform", value: platform),
2261
+ RubyCommand.Argument(name: "platforms", value: platforms),
2259
2262
  RubyCommand.Argument(name: "language", value: language),
2260
2263
  RubyCommand.Argument(name: "company_name", value: companyName),
2261
2264
  RubyCommand.Argument(name: "skip_itc", value: skipItc),
@@ -2316,6 +2319,7 @@ func createKeychain(name: String? = nil,
2316
2319
  - repo: The name of the repository you want to submit the pull request to
2317
2320
  - title: The title of the pull request
2318
2321
  - body: The contents of the pull request
2322
+ - draft: Indicates whether the pull request is a draft
2319
2323
  - labels: The labels for the pull request
2320
2324
  - milestone: The milestone ID (Integer) for the pull request
2321
2325
  - head: The name of the branch where your changes are implemented (defaults to the current branch name)
@@ -2331,6 +2335,7 @@ func createPullRequest(apiToken: String,
2331
2335
  repo: String,
2332
2336
  title: String,
2333
2337
  body: String? = nil,
2338
+ draft: Bool? = nil,
2334
2339
  labels: [String]? = nil,
2335
2340
  milestone: String? = nil,
2336
2341
  head: String? = nil,
@@ -2343,6 +2348,7 @@ func createPullRequest(apiToken: String,
2343
2348
  RubyCommand.Argument(name: "repo", value: repo),
2344
2349
  RubyCommand.Argument(name: "title", value: title),
2345
2350
  RubyCommand.Argument(name: "body", value: body),
2351
+ RubyCommand.Argument(name: "draft", value: draft),
2346
2352
  RubyCommand.Argument(name: "labels", value: labels),
2347
2353
  RubyCommand.Argument(name: "milestone", value: milestone),
2348
2354
  RubyCommand.Argument(name: "head", value: head),
@@ -4956,6 +4962,8 @@ func pem(development: Bool = false,
4956
4962
  - usesNonExemptEncryption: Provide the 'Uses Non-Exempt Encryption' for export compliance. This is used if there is 'ITSAppUsesNonExemptEncryption' is not set in the Info.plist
4957
4963
  - distributeExternal: Should the build be distributed to external testers?
4958
4964
  - notifyExternalTesters: Should notify external testers?
4965
+ - appVersion: The version number of the application build to distribute. If the version number is not specified, then the most recent build uploaded to TestFlight will be distributed. If specified, the most recent build for the version number will be distributed
4966
+ - buildNumber: The build number of the application build to distribute. If the build number is not specified, the most recent build is distributed
4959
4967
  - firstName: The tester's first name
4960
4968
  - lastName: The tester's last name
4961
4969
  - email: The tester's email
@@ -4990,6 +4998,8 @@ func pilot(username: String,
4990
4998
  usesNonExemptEncryption: Bool = false,
4991
4999
  distributeExternal: Bool = false,
4992
5000
  notifyExternalTesters: Bool = true,
5001
+ appVersion: String? = nil,
5002
+ buildNumber: String? = nil,
4993
5003
  firstName: String? = nil,
4994
5004
  lastName: String? = nil,
4995
5005
  email: String? = nil,
@@ -5020,6 +5030,8 @@ func pilot(username: String,
5020
5030
  RubyCommand.Argument(name: "uses_non_exempt_encryption", value: usesNonExemptEncryption),
5021
5031
  RubyCommand.Argument(name: "distribute_external", value: distributeExternal),
5022
5032
  RubyCommand.Argument(name: "notify_external_testers", value: notifyExternalTesters),
5033
+ RubyCommand.Argument(name: "app_version", value: appVersion),
5034
+ RubyCommand.Argument(name: "build_number", value: buildNumber),
5023
5035
  RubyCommand.Argument(name: "first_name", value: firstName),
5024
5036
  RubyCommand.Argument(name: "last_name", value: lastName),
5025
5037
  RubyCommand.Argument(name: "email", value: email),
@@ -5250,6 +5262,7 @@ func println(message: String? = nil) {
5250
5262
  - appVersion: Initial version number (e.g. '1.0')
5251
5263
  - sku: SKU Number (e.g. '1234')
5252
5264
  - platform: The platform to use (optional)
5265
+ - platforms: The platforms to use (optional)
5253
5266
  - language: Primary Language (e.g. 'English', 'German')
5254
5267
  - companyName: The name of your company. Only required if it's the first app you create
5255
5268
  - skipItc: Skip the creation of the app on App Store Connect
@@ -5273,6 +5286,7 @@ func produce(username: String,
5273
5286
  appVersion: String? = nil,
5274
5287
  sku: String,
5275
5288
  platform: String = "ios",
5289
+ platforms: [String]? = nil,
5276
5290
  language: String = "English",
5277
5291
  companyName: String? = nil,
5278
5292
  skipItc: Bool = false,
@@ -5291,6 +5305,7 @@ func produce(username: String,
5291
5305
  RubyCommand.Argument(name: "app_version", value: appVersion),
5292
5306
  RubyCommand.Argument(name: "sku", value: sku),
5293
5307
  RubyCommand.Argument(name: "platform", value: platform),
5308
+ RubyCommand.Argument(name: "platforms", value: platforms),
5294
5309
  RubyCommand.Argument(name: "language", value: language),
5295
5310
  RubyCommand.Argument(name: "company_name", value: companyName),
5296
5311
  RubyCommand.Argument(name: "skip_itc", value: skipItc),
@@ -6377,13 +6392,16 @@ func setupCircleCi(force: Bool = false) {
6377
6392
  - resultBundle: Produce the result bundle describing what occurred will be placed
6378
6393
 
6379
6394
  - Adds and unlocks keychains from Jenkins 'Keychains and Provisioning Profiles Plugin'|
6395
+ - Sets unlocked keychain to be used by Match|
6380
6396
  - Sets code signing identity from Jenkins 'Keychains and Provisioning Profiles Plugin'|
6381
6397
  - Sets output directory to './output' (gym, scan and backup_xcarchive)|
6382
6398
  - Sets derived data path to './derivedData' (xcodebuild, gym, scan and clear_derived_data, carthage)|
6383
6399
  - Produce result bundle (gym and scan)|
6384
6400
  >|
6385
6401
  This action helps with Jenkins integration. Creates own derived data for each job. All build results like IPA files and archives will be stored in the `./output` directory.
6386
- The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used. By default this action will only work when _fastlane_ is executed on a CI system.
6402
+ The action also works with [Keychains and Provisioning Profiles Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Keychains+and+Provisioning+Profiles+Plugin), the selected keychain will be automatically unlocked and the selected code signing identity will be used.
6403
+ [Match](https://docs.fastlane.tools/actions/match/) will be also set up to use the unlocked keychain and set in read-only mode, if its environment variables were not yet defined.
6404
+ By default this action will only work when _fastlane_ is executed on a CI system.
6387
6405
  */
6388
6406
  func setupJenkins(force: Bool = false,
6389
6407
  unlockKeychain: Bool = true,
@@ -7372,6 +7390,8 @@ func testfairy(apiKey: String,
7372
7390
  - usesNonExemptEncryption: Provide the 'Uses Non-Exempt Encryption' for export compliance. This is used if there is 'ITSAppUsesNonExemptEncryption' is not set in the Info.plist
7373
7391
  - distributeExternal: Should the build be distributed to external testers?
7374
7392
  - notifyExternalTesters: Should notify external testers?
7393
+ - appVersion: The version number of the application build to distribute. If the version number is not specified, then the most recent build uploaded to TestFlight will be distributed. If specified, the most recent build for the version number will be distributed
7394
+ - buildNumber: The build number of the application build to distribute. If the build number is not specified, the most recent build is distributed
7375
7395
  - firstName: The tester's first name
7376
7396
  - lastName: The tester's last name
7377
7397
  - email: The tester's email
@@ -7406,6 +7426,8 @@ func testflight(username: String,
7406
7426
  usesNonExemptEncryption: Bool = false,
7407
7427
  distributeExternal: Bool = false,
7408
7428
  notifyExternalTesters: Bool = true,
7429
+ appVersion: String? = nil,
7430
+ buildNumber: String? = nil,
7409
7431
  firstName: String? = nil,
7410
7432
  lastName: String? = nil,
7411
7433
  email: String? = nil,
@@ -7436,6 +7458,8 @@ func testflight(username: String,
7436
7458
  RubyCommand.Argument(name: "uses_non_exempt_encryption", value: usesNonExemptEncryption),
7437
7459
  RubyCommand.Argument(name: "distribute_external", value: distributeExternal),
7438
7460
  RubyCommand.Argument(name: "notify_external_testers", value: notifyExternalTesters),
7461
+ RubyCommand.Argument(name: "app_version", value: appVersion),
7462
+ RubyCommand.Argument(name: "build_number", value: buildNumber),
7439
7463
  RubyCommand.Argument(name: "first_name", value: firstName),
7440
7464
  RubyCommand.Argument(name: "last_name", value: lastName),
7441
7465
  RubyCommand.Argument(name: "email", value: email),
@@ -7581,6 +7605,7 @@ func updateAppIdentifier(xcodeproj: String,
7581
7605
  - useAutomaticSigning: Defines if project should use automatic signing
7582
7606
  - teamId: Team ID, is used when upgrading project
7583
7607
  - targets: Specify targets you want to toggle the signing mech. (default to all targets)
7608
+ - buildConfigurations: Specify build_configurations you want to toggle the signing mech. (default to all targets)
7584
7609
  - codeSignIdentity: Code signing identity type (iPhone Developer, iPhone Distribution)
7585
7610
  - profileName: Provisioning profile name to use for code signing
7586
7611
  - profileUuid: Provisioning profile UUID to use for code signing
@@ -7594,6 +7619,7 @@ func updateCodeSigningSettings(path: String,
7594
7619
  useAutomaticSigning: Bool = false,
7595
7620
  teamId: String? = nil,
7596
7621
  targets: [String]? = nil,
7622
+ buildConfigurations: [String]? = nil,
7597
7623
  codeSignIdentity: String? = nil,
7598
7624
  profileName: String? = nil,
7599
7625
  profileUuid: String? = nil,
@@ -7602,6 +7628,7 @@ func updateCodeSigningSettings(path: String,
7602
7628
  RubyCommand.Argument(name: "use_automatic_signing", value: useAutomaticSigning),
7603
7629
  RubyCommand.Argument(name: "team_id", value: teamId),
7604
7630
  RubyCommand.Argument(name: "targets", value: targets),
7631
+ RubyCommand.Argument(name: "build_configurations", value: buildConfigurations),
7605
7632
  RubyCommand.Argument(name: "code_sign_identity", value: codeSignIdentity),
7606
7633
  RubyCommand.Argument(name: "profile_name", value: profileName),
7607
7634
  RubyCommand.Argument(name: "profile_uuid", value: profileUuid),
@@ -8269,6 +8296,8 @@ func uploadToPlayStoreInternalAppSharing(packageName: String,
8269
8296
  - usesNonExemptEncryption: Provide the 'Uses Non-Exempt Encryption' for export compliance. This is used if there is 'ITSAppUsesNonExemptEncryption' is not set in the Info.plist
8270
8297
  - distributeExternal: Should the build be distributed to external testers?
8271
8298
  - notifyExternalTesters: Should notify external testers?
8299
+ - appVersion: The version number of the application build to distribute. If the version number is not specified, then the most recent build uploaded to TestFlight will be distributed. If specified, the most recent build for the version number will be distributed
8300
+ - buildNumber: The build number of the application build to distribute. If the build number is not specified, the most recent build is distributed
8272
8301
  - firstName: The tester's first name
8273
8302
  - lastName: The tester's last name
8274
8303
  - email: The tester's email
@@ -8303,6 +8332,8 @@ func uploadToTestflight(username: String,
8303
8332
  usesNonExemptEncryption: Bool = false,
8304
8333
  distributeExternal: Bool = false,
8305
8334
  notifyExternalTesters: Bool = true,
8335
+ appVersion: String? = nil,
8336
+ buildNumber: String? = nil,
8306
8337
  firstName: String? = nil,
8307
8338
  lastName: String? = nil,
8308
8339
  email: String? = nil,
@@ -8333,6 +8364,8 @@ func uploadToTestflight(username: String,
8333
8364
  RubyCommand.Argument(name: "uses_non_exempt_encryption", value: usesNonExemptEncryption),
8334
8365
  RubyCommand.Argument(name: "distribute_external", value: distributeExternal),
8335
8366
  RubyCommand.Argument(name: "notify_external_testers", value: notifyExternalTesters),
8367
+ RubyCommand.Argument(name: "app_version", value: appVersion),
8368
+ RubyCommand.Argument(name: "build_number", value: buildNumber),
8336
8369
  RubyCommand.Argument(name: "first_name", value: firstName),
8337
8370
  RubyCommand.Argument(name: "last_name", value: lastName),
8338
8371
  RubyCommand.Argument(name: "email", value: email),
@@ -8787,4 +8820,4 @@ let snapshotfile: Snapshotfile = Snapshotfile()
8787
8820
 
8788
8821
  // Please don't remove the lines below
8789
8822
  // They are used to detect outdated files
8790
- // FastlaneRunnerAPIVersion [0.9.73]
8823
+ // FastlaneRunnerAPIVersion [0.9.74]
@@ -18,4 +18,4 @@ class Gymfile: GymfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -18,4 +18,4 @@ class Matchfile: MatchfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -18,4 +18,4 @@ class Precheckfile: PrecheckfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -18,4 +18,4 @@ class Scanfile: ScanfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -18,4 +18,4 @@ class Screengrabfile: ScreengrabfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -18,4 +18,4 @@ class Snapshotfile: SnapshotfileProtocol {
18
18
 
19
19
 
20
20
 
21
- // Generated with fastlane 2.145.0
21
+ // Generated with fastlane 2.146.0
@@ -2,6 +2,7 @@ require_relative '../ui/ui'
2
2
  require_relative '../ui/errors/fastlane_error'
3
3
  require_relative '../helper'
4
4
  require_relative '../module'
5
+ require 'json'
5
6
 
6
7
  module FastlaneCore
7
8
  class ConfigItem
@@ -227,6 +228,7 @@ module FastlaneCore
227
228
  true
228
229
  end
229
230
 
231
+ # rubocop:disable Metrics/PerceivedComplexity
230
232
  # Returns an updated value type (if necessary)
231
233
  def auto_convert_value(value)
232
234
  return nil if value.nil?
@@ -240,6 +242,12 @@ module FastlaneCore
240
242
  elsif allow_shell_conversion
241
243
  return value.shelljoin if value.kind_of?(Array)
242
244
  return value.map { |k, v| "#{k.to_s.shellescape}=#{v.shellescape}" }.join(' ') if value.kind_of?(Hash)
245
+ elsif data_type == Hash && value.kind_of?(String)
246
+ begin
247
+ parsed = JSON.parse(value)
248
+ return parsed if parsed.kind_of?(Hash)
249
+ rescue JSON::ParserError
250
+ end
243
251
  elsif data_type != String
244
252
  # Special treatment if the user specified true, false or YES, NO
245
253
  # There is no boolean type, so we just do it here
@@ -249,6 +257,7 @@ module FastlaneCore
249
257
  return false
250
258
  end
251
259
  end
260
+ # rubocop:enable Metrics/PerceivedComplexity
252
261
 
253
262
  return value # fallback to not doing anything
254
263
  end
@@ -49,8 +49,8 @@ module FastlaneCore
49
49
 
50
50
  # " iPad (5th generation) (852A5796-63C3-4641-9825-65EBDC5C4259) (Shutdown)"
51
51
  # This line will turn the above string into
52
- # ["iPad", "(5th generation)", "(852A5796-63C3-4641-9825-65EBDC5C4259)", "(Shutdown)"]
53
- matches = line.strip.scan(/(.*?) (\(.*?\))/).flatten.reject(&:empty?)
52
+ # ["iPad (5th generation)", "(852A5796-63C3-4641-9825-65EBDC5C4259)", "(Shutdown)"]
53
+ matches = line.strip.scan(/^(.*?) (\([^)]*?\)) (\([^)]*?\))$/).flatten.reject(&:empty?)
54
54
  state = matches.pop.to_s.delete('(').delete(')')
55
55
  udid = matches.pop.to_s.delete('(').delete(')')
56
56
  name = matches.join(' ')
@@ -535,7 +535,7 @@ module Frameit
535
535
  fonts.each do |font|
536
536
  if font['supported']
537
537
  font['supported'].each do |language|
538
- if screenshot.path.include?(language)
538
+ if screenshot.language == language
539
539
  return font["font"]
540
540
  end
541
541
  end
@@ -122,6 +122,10 @@ module Frameit
122
122
  return File.mtime(path) > File.mtime(output_path)
123
123
  end
124
124
 
125
+ def language
126
+ @language ||= Pathname.new(path).parent.basename.to_s
127
+ end
128
+
125
129
  def to_s
126
130
  self.path
127
131
  end
@@ -50,6 +50,8 @@ module Match
50
50
  certificate_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DEVELOPMENT + "," + Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPMENT
51
51
  when :distribution, :enterprise
52
52
  certificate_type = Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION + "," + Spaceship::ConnectAPI::Certificate::CertificateType::DISTRIBUTION
53
+ when :developer_id_application
54
+ certificate_type = Spaceship::ConnectAPI::Certificate::CertificateType::DEVELOPER_ID_APPLICATION
53
55
  else
54
56
  UI.user_error!("Cert type '#{cert_type}' is not supported")
55
57
  end
@@ -89,7 +89,7 @@ module Match
89
89
  self.working_directory = Dir.mktmpdir
90
90
 
91
91
  s3_client.find_bucket!(s3_bucket).objects.each do |object|
92
- file_path = object.public_url.to_s.split("s3.amazonaws.com/").last
92
+ file_path = object.key # :team_id/path/to/file
93
93
  download_path = File.join(self.working_directory, file_path)
94
94
 
95
95
  FileUtils.mkdir_p(File.expand_path("..", download_path))
@@ -111,17 +111,17 @@ module Match
111
111
  # Those doesn't mean they're new, it might just be they're changed
112
112
  # Either way, we'll upload them using the same technique
113
113
 
114
- files_to_upload.each do |current_file|
114
+ files_to_upload.each do |file_name|
115
115
  # Go from
116
116
  # "/var/folders/px/bz2kts9n69g8crgv4jpjh6b40000gn/T/d20181026-96528-1av4gge/profiles/development/Development_me.mobileprovision"
117
117
  # to
118
118
  # "profiles/development/Development_me.mobileprovision"
119
119
  #
120
120
 
121
- target_path = current_file.gsub(self.working_directory + "/", "")
121
+ target_path = sanitize_file_name(file_name)
122
122
  UI.verbose("Uploading '#{target_path}' to S3 Storage...")
123
123
 
124
- body = File.read(current_file)
124
+ body = File.read(file_name)
125
125
  acl = 'private'
126
126
  s3_url = s3_client.upload_file(s3_bucket, target_path, body, acl)
127
127
  UI.verbose("Uploaded '#{s3_url}' to S3 Storage.")
@@ -130,7 +130,8 @@ module Match
130
130
 
131
131
  def delete_files(files_to_delete: [], custom_message: nil)
132
132
  files_to_delete.each do |file_name|
133
- s3_client.delete_file(s3_bucket, file_name)
133
+ target_path = sanitize_file_name(file_name)
134
+ s3_client.delete_file(s3_bucket, target_path)
134
135
  end
135
136
  end
136
137
 
@@ -147,6 +148,10 @@ module Match
147
148
 
148
149
  private
149
150
 
151
+ def sanitize_file_name(file_name)
152
+ file_name.gsub(self.working_directory + "/", "")
153
+ end
154
+
150
155
  def currently_used_team_id
151
156
  if self.readonly
152
157
  # In readonly mode, we still want to see if the user provided a team_id
@@ -118,9 +118,17 @@ module Pilot
118
118
 
119
119
  # Get latest uploaded build if no build specified
120
120
  if build.nil?
121
- UI.important("No build specified - fetching latest build")
121
+ app_version = config[:app_version]
122
+ build_number = config[:build_number]
123
+ if build_number.nil?
124
+ if app_version.nil?
125
+ UI.important("No build specified - fetching latest build")
126
+ else
127
+ UI.important("No build specified - fetching latest build for version #{app_version}")
128
+ end
129
+ end
122
130
  platform = Spaceship::ConnectAPI::Platform.map(fetch_app_platform)
123
- build ||= Spaceship::ConnectAPI::Build.all(app_id: app.id, sort: "-uploadedDate", platform: platform, limit: 1).first
131
+ build ||= Spaceship::ConnectAPI::Build.all(app_id: app.id, version: app_version, build_number: build_number, sort: "-uploadedDate", platform: platform, limit: 1).first
124
132
  end
125
133
 
126
134
  # Verify the build has all the includes that we need
@@ -207,8 +215,11 @@ module Pilot
207
215
  end
208
216
 
209
217
  def update_beta_app_meta(options, build)
210
- # Setting account required wth AppStore Connect API
211
- update_review_detail(build, { demo_account_required: options[:demo_account_required] })
218
+ # If demo_account_required is a parameter, it should added into beta_app_review_info
219
+ unless options[:demo_account_required].nil?
220
+ options[:beta_app_review_info] = {} if options[:beta_app_review_info].nil?
221
+ options[:beta_app_review_info][:demo_account_required] = options[:demo_account_required]
222
+ end
212
223
 
213
224
  if should_update_beta_app_review_info(options)
214
225
  update_review_detail(build, options[:beta_app_review_info])