fastlane 2.16.0 → 2.17.0

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: 8b23a6ac1c98d9099fd80546792028a9577636ef
4
- data.tar.gz: 348db27cd92fa4d8ee520232af4e46e024d77c85
3
+ metadata.gz: c2018da1149a04271e1861829b2c3174e3fbffa9
4
+ data.tar.gz: 009843a49c26bc5e69a8741563dce459efea763c
5
5
  SHA512:
6
- metadata.gz: b7ae6adfd2c431a9f0d98f5d4919a04a94babb87b8669f267de8bd3fb3c028710feb5a72e806960f048947bfadfc9fd3a7e20b393c0b242d8269424cef6e87b3
7
- data.tar.gz: 42170999f744728ccda59909a0242b81f7ce8ffcee2b37e98e9d9e6262c90e588618f02b3cf5f8522f2bdae1fc735e224665837c60c13eaa78a27e607c19a271
6
+ metadata.gz: 8b5fac2721f6284bf23a447e2463d9d7c5ad2a51e44e1c72441b5a6fd5ce9c468d8070881370111fbfe9e19188e62277596c0c5440383455d422df741205dc60
7
+ data.tar.gz: fa94f1bc432ccd8ab9257a7478d8dfed2ce5267a04a671b3ab7b18206d0dd560a8c37de9199006a8ca6e9ef8f0ba06013d977bf506e8484fb940b5b5d4acb5ed
@@ -22,12 +22,12 @@ module Cert
22
22
 
23
23
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
24
24
 
25
- FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options)
26
-
27
25
  command :create do |c|
28
26
  c.syntax = 'fastlane cert create'
29
27
  c.description = 'Create new iOS code signing certificates'
30
28
 
29
+ FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options, command: c)
30
+
31
31
  c.action do |args, options|
32
32
  Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, options.__hash__)
33
33
  Cert::Runner.new.launch
@@ -38,6 +38,8 @@ module Cert
38
38
  c.syntax = 'fastlane cert revoke_expired'
39
39
  c.description = 'Revoke expired iOS code signing certificates'
40
40
 
41
+ FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options, command: c)
42
+
41
43
  c.action do |args, options|
42
44
  Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, options.__hash__)
43
45
  Cert::Runner.new.revoke_expired_certs!
@@ -37,8 +37,6 @@ module Deliver
37
37
  program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/deliver'
38
38
  program :help_formatter, :compact
39
39
 
40
- FastlaneCore::CommanderGenerator.new.generate(deliverfile_options)
41
-
42
40
  global_option('--verbose') { FastlaneCore::Globals.verbose = true }
43
41
 
44
42
  always_trace!
@@ -46,6 +44,9 @@ module Deliver
46
44
  command :run do |c|
47
45
  c.syntax = 'fastlane deliver'
48
46
  c.description = 'Upload metadata and binary to iTunes Connect'
47
+
48
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
49
+
49
50
  c.action do |args, options|
50
51
  options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
51
52
  loaded = options.load_configuration_file("Deliverfile")
@@ -62,9 +63,13 @@ module Deliver
62
63
  Deliver::Runner.new(options).run
63
64
  end
64
65
  end
66
+
65
67
  command :submit_build do |c|
66
68
  c.syntax = 'fastlane deliver submit_build'
67
69
  c.description = 'Submit a specific build-nr for review, use latest for the latest build'
70
+
71
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
72
+
68
73
  c.action do |args, options|
69
74
  options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
70
75
  options.load_configuration_file("Deliverfile")
@@ -73,9 +78,13 @@ module Deliver
73
78
  Deliver::Runner.new(options).run
74
79
  end
75
80
  end
81
+
76
82
  command :init do |c|
77
83
  c.syntax = 'fastlane deliver init'
78
84
  c.description = 'Create the initial `deliver` configuration based on an existing app'
85
+
86
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
87
+
79
88
  c.action do |args, options|
80
89
  if File.exist?("Deliverfile") or File.exist?("fastlane/Deliverfile")
81
90
  UI.important("You already have a running deliver setup in this directory")
@@ -92,6 +101,9 @@ module Deliver
92
101
  command :generate_summary do |c|
93
102
  c.syntax = 'fastlane deliver generate_summary'
94
103
  c.description = 'Generate HTML Summary without uploading/downloading anything'
104
+
105
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
106
+
95
107
  c.action do |args, options|
96
108
  options = FastlaneCore::Configuration.create(deliverfile_options, options.__hash__)
97
109
  options.load_configuration_file("Deliverfile")
@@ -106,6 +118,8 @@ module Deliver
106
118
  c.syntax = 'fastlane deliver download_screenshots'
107
119
  c.description = "Downloads all existing screenshots from iTunes Connect and stores them in the screenshots folder"
108
120
 
121
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
122
+
109
123
  c.action do |args, options|
110
124
  options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__)
111
125
  options.load_configuration_file("Deliverfile")
@@ -120,6 +134,8 @@ module Deliver
120
134
  c.syntax = 'fastlane deliver download_metadata'
121
135
  c.description = "Downloads existing metadata and stores it locally. This overwrites the local files."
122
136
 
137
+ FastlaneCore::CommanderGenerator.new.generate(deliverfile_options, command: c)
138
+
123
139
  c.action do |args, options|
124
140
  options = FastlaneCore::Configuration.create(deliverfile_options(skip_verification: true), options.__hash__)
125
141
  options.load_configuration_file("Deliverfile")
@@ -20,7 +20,8 @@ module Deliver
20
20
 
21
21
  options[:app_identifier] = identifier if identifier.to_s.length > 0
22
22
  options[:app_identifier] ||= UI.input("The Bundle Identifier of your App: ")
23
- rescue
23
+ rescue => ex
24
+ UI.error(ex)
24
25
  UI.user_error!("Could not infer your App's Bundle Identifier")
25
26
  end
26
27
 
@@ -54,7 +55,8 @@ module Deliver
54
55
  elsif options[:pkg]
55
56
  options[:app_version] ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg])
56
57
  end
57
- rescue
58
+ rescue => ex
59
+ UI.error(ex)
58
60
  UI.user_error!("Could not infer your app's version")
59
61
  end
60
62
 
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.16.0'.freeze
2
+ VERSION = '2.17.0'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -26,7 +26,7 @@ module Spaceship
26
26
  # @return (Array) A list of all available teams
27
27
  def teams
28
28
  return @teams if @teams
29
- req = request(:post, "https://developerservices2.apple.com/services/QH65B2/listTeams.action")
29
+ req = request(:post, "account/listTeams.action")
30
30
  @teams = parse_response(req, 'teams').sort_by do |team|
31
31
  [
32
32
  team['name'],
@@ -363,16 +363,15 @@ module Spaceship
363
363
  def create_device!(device_name, device_id, mac: false)
364
364
  ensure_csrf(Spaceship::Device)
365
365
 
366
- req = request(:post) do |r|
367
- r.url "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/addDevice.action"
368
- r.params = {
369
- teamId: team_id,
370
- deviceNumber: device_id,
371
- name: device_name
372
- }
373
- end
366
+ req = request(:post, "account/#{platform_slug(mac)}/device/addDevices.action", {
367
+ teamId: team_id,
368
+ deviceClasses: mac ? 'mac' : 'iphone',
369
+ deviceNumbers: device_id,
370
+ deviceNames: device_name,
371
+ register: 'single'
372
+ })
374
373
 
375
- parse_response(req, 'device')
374
+ parse_response(req, 'devices').first
376
375
  end
377
376
 
378
377
  def disable_device!(device_id, device_udid, mac: false)
@@ -452,16 +451,18 @@ module Spaceship
452
451
  #####################################################
453
452
 
454
453
  def provisioning_profiles(mac: false)
455
- req = request(:post) do |r|
456
- r.url "https://developerservices2.apple.com/services/#{PROTOCOL_VERSION}/#{platform_slug(mac)}/listProvisioningProfiles.action"
457
- r.params = {
454
+ paging do |page_number|
455
+ req = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", {
458
456
  teamId: team_id,
457
+ pageNumber: page_number,
458
+ pageSize: page_size,
459
+ sort: 'name=asc',
459
460
  includeInactiveProfiles: true,
460
461
  onlyCountLists: true
461
- }
462
- end
462
+ })
463
463
 
464
- parse_response(req, 'provisioningProfiles')
464
+ parse_response(req, 'provisioningProfiles')
465
+ end
465
466
  end
466
467
 
467
468
  def provisioning_profile_details(provisioning_profile_id: nil, mac: false)
@@ -473,9 +474,7 @@ module Spaceship
473
474
  end
474
475
 
475
476
  def create_provisioning_profile!(name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
476
- ensure_csrf(Spaceship::ProvisioningProfile) do
477
- fetch_csrf_token_for_provisioning
478
- end
477
+ ensure_csrf(Spaceship::ProvisioningProfile)
479
478
 
480
479
  params = {
481
480
  teamId: team_id,
@@ -492,9 +491,7 @@ module Spaceship
492
491
  end
493
492
 
494
493
  def download_provisioning_profile(profile_id, mac: false)
495
- ensure_csrf(Spaceship::ProvisioningProfile) do
496
- fetch_csrf_token_for_provisioning
497
- end
494
+ ensure_csrf(Spaceship::ProvisioningProfile)
498
495
 
499
496
  r = request(:get, "account/#{platform_slug(mac)}/profile/downloadProfileContent", {
500
497
  teamId: team_id,
@@ -509,9 +506,7 @@ module Spaceship
509
506
  end
510
507
 
511
508
  def delete_provisioning_profile!(profile_id, mac: false)
512
- ensure_csrf(Spaceship::ProvisioningProfile) do
513
- fetch_csrf_token_for_provisioning
514
- end
509
+ ensure_csrf(Spaceship::ProvisioningProfile)
515
510
 
516
511
  r = request(:post, "account/#{platform_slug(mac)}/profile/deleteProvisioningProfile.action", {
517
512
  teamId: team_id,
@@ -521,9 +516,7 @@ module Spaceship
521
516
  end
522
517
 
523
518
  def repair_provisioning_profile!(profile_id, name, distribution_method, app_id, certificate_ids, device_ids, mac: false, sub_platform: nil)
524
- ensure_csrf(Spaceship::ProvisioningProfile) do
525
- fetch_csrf_token_for_provisioning
526
- end
519
+ ensure_csrf(Spaceship::ProvisioningProfile)
527
520
 
528
521
  params = {
529
522
  teamId: team_id,
@@ -541,27 +534,6 @@ module Spaceship
541
534
  parse_response(r, 'provisioningProfile')
542
535
  end
543
536
 
544
- # We need a custom way to fetch the csrf token for the provisioning profile requests, since
545
- # we use a separate API endpoint (host of Xcode API) to fetch the provisioning profiles
546
- # All we do is fetch one profile (if exists) to get a valid csrf token with its time stamp
547
- # This method is being called from all requests that modify, create or downloading provisioning
548
- # profiles.
549
- # Source https://github.com/fastlane/fastlane/issues/5903
550
- def fetch_csrf_token_for_provisioning(mac: false)
551
- req = request(:post) do |r|
552
- r.url "https://developer.apple.com/services-account/#{PROTOCOL_VERSION}/account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action"
553
- r.params = {
554
- teamId: team_id,
555
- pageSize: 1,
556
- pageNumber: 1,
557
- sort: "name=asc"
558
- }
559
- end
560
-
561
- parse_response(req, 'provisioningProfiles')
562
- return nil
563
- end
564
-
565
537
  private
566
538
 
567
539
  # This is a cache of entity type (App, AppGroup, Certificate, Device) to csrf_tokens
@@ -174,9 +174,6 @@ module Spaceship
174
174
  raise "Can't find class '#{attrs['distributionMethod']}'"
175
175
  end
176
176
 
177
- # eagerload the Apps using the same client if we have to.
178
- attrs['appId'] = App.set_client(@client).factory(attrs['appId'])
179
-
180
177
  klass.client = @client
181
178
  obj = klass.new(attrs)
182
179
 
@@ -258,14 +255,18 @@ module Spaceship
258
255
  # If you're calling this from a subclass (like AdHoc), this will
259
256
  # only return the profiles that are of this type
260
257
  # @param mac (Bool) (optional): Pass true to get all Mac provisioning profiles
261
- # @param xcode (Bool) (optional): Pass true to include Xcode managed provisioning profiles
258
+ # @param xcode DEPRECATED
262
259
  def all(mac: false, xcode: false)
263
260
  profiles = client.provisioning_profiles(mac: mac).map do |profile|
264
261
  self.factory(profile)
265
262
  end
266
263
 
267
264
  # filter out the profiles managed by xcode
268
- profiles.delete_if(&:managed_by_xcode?) unless xcode
265
+ if xcode
266
+ warn('Apple API no longer returns XCode managed Provisioning Profiles')
267
+ else
268
+ profiles.delete_if(&:managed_by_xcode?)
269
+ end
269
270
 
270
271
  return profiles if self == ProvisioningProfile
271
272
 
@@ -474,7 +475,13 @@ module Spaceship
474
475
  end
475
476
  end
476
477
 
477
- return @certificates
478
+ @certificates
479
+ end
480
+
481
+ def app
482
+ fetch_details
483
+
484
+ App.set_client(client).new(profile_details['appId'])
478
485
  end
479
486
 
480
487
  # @return (Bool) Is this current provisioning profile adhoc?
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.16.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-02-14 00:00:00.000000000 Z
17
+ date: 2017-02-15 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: slack-notifier