fastlane 2.29.0.beta.20170424010049 → 2.29.0.beta.20170425010038

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: b1052a99c1d0f413e8791403a2341fb880936b41
4
- data.tar.gz: 11bf7fdf56a2dc8fb7ae271cbb1cf61add8446f8
3
+ metadata.gz: 808c6a8129169aa565f8d17b888fcdc5b9adb80a
4
+ data.tar.gz: d8496ea0117b5aef2de6461d1cc36d080fa83504
5
5
  SHA512:
6
- metadata.gz: f8d563d31c28d4bfe4225512c6382f1816bdc71dc6be17c1bfbda8fc0cab4b66fa2ad65c446d5b6809803ccd61d2cbf403726dd3e050c42f0b295d86ef08a77a
7
- data.tar.gz: 058f132ef186711b29c023ca2b6959f86bf60934d654eb6a464c9065f0b9a34eea0012e8500e571ec75c2d557bdb0511466249e47b4b9ad73b275e96a92981ea
6
+ metadata.gz: 20e6bd7f62ecc0df05335edc2eaf8b9bc3df77e4640bf1d79f099f7d8828c52e7226c980b5db39c407a3cff5c9d48adcd3be86c7fddbdeca5195544ee2784775
7
+ data.tar.gz: b2b04c14e9c02c391adab6e5473d0fc4951ff97e85e0681380291937487b29f2e9373b0240c62e6efa29a780b99ac5901c667c0012c6c0b27d924ba177a85901
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.29.0.beta.20170424010049'.freeze
2
+ VERSION = '2.29.0.beta.20170425010038'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  end
@@ -25,7 +25,7 @@ module FastlaneCore
25
25
  elsif matching_build.active?
26
26
  UI.success("Build #{matching_build.train_version} - #{matching_build.build_version} is already being tested")
27
27
  return matching_build
28
- elsif matching_build.ready_to_submit?
28
+ elsif matching_build.ready_to_submit? || matching_build.export_compliance_missing?
29
29
  UI.success("Successfully finished processing the build #{matching_build.train_version} - #{matching_build.build_version}")
30
30
  return matching_build
31
31
  end
@@ -108,6 +108,10 @@ module Commander
108
108
  FastlaneCore::UI.error("builds for testing, adding and removing testers from groups, and")
109
109
  FastlaneCore::UI.error("waiting for builds to process.")
110
110
  FastlaneCore::UI.error("")
111
+ FastlaneCore::UI.error("Please open an issue on https://github.com/fastlane/fastlane/issues")
112
+ FastlaneCore::UI.error("if you believe this failure is the result of a bug in _pilot_ and we")
113
+ FastlaneCore::UI.error("will be happy to look into this further.")
114
+ FastlaneCore::UI.error("")
111
115
  FastlaneCore::UI.error("Please stay tuned for more updates from _fastlane_ as we fix more issues!")
112
116
  FastlaneCore::UI.error("")
113
117
  if FastlaneCore::Globals.verbose?
@@ -110,10 +110,10 @@ module Pilot
110
110
 
111
111
  # This is where we could add a check to see if encryption is required and has been updated
112
112
  uploaded_build.export_compliance.encryption_updated = false
113
- uploaded_build.beta_review_info.demo_account_required = false
114
- uploaded_build.submit_for_testflight_review!
115
113
 
116
114
  if options[:distribute_external]
115
+ uploaded_build.beta_review_info.demo_account_required = false
116
+ uploaded_build.submit_for_testflight_review!
117
117
  external_group = Spaceship::TestFlight::Group.default_external_group(app_id: uploaded_build.app_id)
118
118
  uploaded_build.add_group!(external_group) unless external_group.nil?
119
119
 
@@ -121,14 +121,18 @@ module Pilot
121
121
  UI.user_error!("You must specify at least one group using the `:groups` option to distribute externally")
122
122
  end
123
123
 
124
- end
125
-
126
- if options[:groups]
127
- groups = Group.filter_groups(app_id: uploaded_build.app_id) do |group|
128
- options[:groups].include?(group.name)
124
+ if options[:groups]
125
+ groups = Spaceship::TestFlight::Group.filter_groups(app_id: uploaded_build.app_id) do |group|
126
+ options[:groups].include?(group.name)
127
+ end
128
+ groups.each do |group|
129
+ uploaded_build.add_group!(group)
130
+ end
129
131
  end
130
- groups.each do |group|
131
- uploaded_build.add_group!(group)
132
+ else # distribute internally
133
+ # in case any changes to export_compliance are required
134
+ if uploaded_build.export_compliance_missing?
135
+ uploaded_build.save!
132
136
  end
133
137
  end
134
138
 
@@ -65,9 +65,18 @@ module Pilot
65
65
  begin
66
66
  app = Spaceship::Application.find(app_filter)
67
67
  UI.user_error!("Couldn't find app with '#{app_filter}'") unless app
68
- groups = remove_tester_from_groups!(tester: tester, app: app, groups: config[:groups])
69
- group_names = groups.map(&:name).join(", ")
70
- UI.success("Successfully removed tester #{tester.email} from app #{app_filter} in group(s) #{group_names}")
68
+
69
+ # If no groups are passed to options, remove the tester from the app-level,
70
+ # otherwise remove the tester from the groups specified.
71
+ if config[:groups].nil?
72
+ test_flight_tester = Spaceship::TestFlight::Tester.find(app_id: app.apple_id, email: tester.email)
73
+ test_flight_tester.remove_from_app!(app_id: app.apple_id)
74
+ UI.success("Successfully removed tester, #{test_flight_tester.email}, from app: #{app_filter}")
75
+ else
76
+ groups = remove_tester_from_groups!(tester: tester, app: app, groups: config[:groups])
77
+ group_names = groups.map(&:name).join(", ")
78
+ UI.success("Successfully removed tester #{tester.email} from app #{app_filter} in group(s) #{group_names}")
79
+ end
71
80
  rescue => ex
72
81
  UI.error("Could not remove #{tester.email} from app: #{ex}")
73
82
  raise ex
@@ -7,3 +7,4 @@ require 'spaceship/test_flight/beta_review_info'
7
7
  require 'spaceship/test_flight/export_compliance'
8
8
  require 'spaceship/test_flight/test_info'
9
9
  require 'spaceship/test_flight/group'
10
+ require 'spaceship/test_flight/tester'
@@ -121,6 +121,10 @@ module Spaceship::TestFlight
121
121
  external_state == BUILD_STATES[:processing]
122
122
  end
123
123
 
124
+ def export_compliance_missing?
125
+ external_state == BUILD_STATES[:export_compliance_missing]
126
+ end
127
+
124
128
  # Getting builds from BuildTrains only gets a partial Build object
125
129
  # We are then requesting the full build from iTC when we need to access
126
130
  # any of the variables below, because they are not inlcuded in the partial Build objects
@@ -20,6 +20,20 @@ module Spaceship::TestFlight
20
20
  handle_response(response)
21
21
  end
22
22
 
23
+ def testers_for_app(app_id: nil)
24
+ assert_required_params(__method__, binding)
25
+ url = "providers/#{team_id}/apps/#{app_id}/testers"
26
+ response = request(:get, url)
27
+ handle_response(response)
28
+ end
29
+
30
+ def delete_tester_from_app(app_id: nil, tester_id: nil)
31
+ assert_required_params(__method__, binding)
32
+ url = "providers/#{team_id}/apps/#{app_id}/testers/#{tester_id}"
33
+ response = request(:delete, url)
34
+ handle_response(response)
35
+ end
36
+
23
37
  def post_tester(app_id: nil, tester: nil)
24
38
  assert_required_params(__method__, binding)
25
39
  url = "providers/#{team_id}/apps/#{app_id}/testers"
@@ -0,0 +1,34 @@
1
+ module Spaceship::TestFlight
2
+ class Tester < Base
3
+ # @return (String) The identifier of this tester, provided by iTunes Connect
4
+ # @example
5
+ # "60f858b4-60a8-428a-963a-f943a3d68d17"
6
+ attr_accessor :tester_id
7
+
8
+ # @return (String) The email of this tester
9
+ # @example
10
+ # "tester@spaceship.com"
11
+ attr_accessor :email
12
+
13
+ attr_mapping(
14
+ 'id' => :tester_id,
15
+ 'email' => :email
16
+ )
17
+
18
+ # @return (Array) Returns all beta testers available for this account
19
+ def self.all(app_id: nil)
20
+ client.testers_for_app(app_id: app_id).map { |data| self.new(data) }
21
+ end
22
+
23
+ # @return (Spaceship::TestFlight::Tester) Returns the tester matching the parameter
24
+ # as either the Tester id or email
25
+ # @param email (String) (required): Value used to filter the tester, case insensitive
26
+ def self.find(app_id: nil, email: nil)
27
+ self.all(app_id: app_id).find { |tester| tester.email == email }
28
+ end
29
+
30
+ def remove_from_app!(app_id: nil)
31
+ client.delete_tester_from_app(app_id: app_id, tester_id: self.tester_id)
32
+ end
33
+ end
34
+ 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.29.0.beta.20170424010049
4
+ version: 2.29.0.beta.20170425010038
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-04-24 00:00:00.000000000 Z
18
+ date: 2017-04-25 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -1279,6 +1279,7 @@ files:
1279
1279
  - spaceship/lib/spaceship/test_flight/export_compliance.rb
1280
1280
  - spaceship/lib/spaceship/test_flight/group.rb
1281
1281
  - spaceship/lib/spaceship/test_flight/test_info.rb
1282
+ - spaceship/lib/spaceship/test_flight/tester.rb
1282
1283
  - spaceship/lib/spaceship/tunes/app_details.rb
1283
1284
  - spaceship/lib/spaceship/tunes/app_image.rb
1284
1285
  - spaceship/lib/spaceship/tunes/app_ratings.rb
@@ -1341,23 +1342,23 @@ metadata:
1341
1342
  post_install_message:
1342
1343
  rdoc_options: []
1343
1344
  require_paths:
1344
- - fastlane_core/lib
1345
- - produce/lib
1346
- - cert/lib
1345
+ - snapshot/lib
1347
1346
  - screengrab/lib
1348
- - deliver/lib
1349
- - gym/lib
1350
1347
  - spaceship/lib
1351
- - frameit/lib
1352
- - supply/lib
1353
1348
  - sigh/lib
1354
- - match/lib
1349
+ - pilot/lib
1350
+ - supply/lib
1355
1351
  - fastlane/lib
1352
+ - frameit/lib
1353
+ - cert/lib
1354
+ - fastlane_core/lib
1355
+ - produce/lib
1356
1356
  - credentials_manager/lib
1357
+ - deliver/lib
1358
+ - gym/lib
1357
1359
  - scan/lib
1358
- - pilot/lib
1360
+ - match/lib
1359
1361
  - pem/lib
1360
- - snapshot/lib
1361
1362
  required_ruby_version: !ruby/object:Gem::Requirement
1362
1363
  requirements:
1363
1364
  - - ">="