fastlane 2.28.3 → 2.28.4

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: 132c1e0c8db40d3853f4576395288e72daa87566
4
- data.tar.gz: 7ee3eda821ffa5c322b26e71353ddc85f88762db
3
+ metadata.gz: 0741fe0112b31121452836380edebdb3b28bc426
4
+ data.tar.gz: 5993c9a13295c5d4e068c4d198c72950955860af
5
5
  SHA512:
6
- metadata.gz: c6c0218b29725f2712368bb9509dbfaac34ec395f97025cf9d8d61b22d310449b77496e17d17ccd03524b55aab62c96cc0c3ca29e958bdeaf06bd03c675f9141
7
- data.tar.gz: 3ac754b83ddcea678f21538cc171c05072668cb8ceed8c315f56452d2dcfe2f65d9a364847a67aff55ab0135de5a1004819eb5953543b0aca52dd100043ce4c9
6
+ metadata.gz: 7f17c50a5bf22101dd424d8aeba9dc18ee8e5ba136e2e051609cc67cf68b704ed458e1cf3e89ab36b8b57f7fb7f08312941eb7c302195a0d88b14ced356669ac
7
+ data.tar.gz: 60e9099954524f4e149cbd1a1645b4bdea6a157a4540fda6720bb2e75f6ad8f27a8d383660ea5c0156e285a0bb3a58535aa58dfcd9b1974f4a4ab866a6cfa7c7
@@ -1,4 +1,4 @@
1
1
  module Fastlane
2
- VERSION = '2.28.3'.freeze
2
+ VERSION = '2.28.4'.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?
@@ -45,8 +45,8 @@ module Fastlane
45
45
  status = (resolved ? issue.state.green : issue.state.red)
46
46
 
47
47
  puts "➡️ #{issue.title.yellow}"
48
- puts " #{issue.html_url} [#{status}] #{issue.comments} 💬"
49
- puts " #{Time.parse(issue.updated_at).to_pretty}"
48
+ puts " #{issue.html_url} [#{status}] #{issue.comments} 💬"
49
+ puts " #{Time.parse(issue.updated_at).to_pretty}"
50
50
  puts ""
51
51
  end
52
52
 
@@ -46,11 +46,9 @@ module Pilot
46
46
  config[:app_identifier] = UI.input("App Identifier: ")
47
47
  end
48
48
 
49
- unless config[:update_build_info_on_upload]
50
- if should_update_build_information(options)
51
- build.update_build_information!(whats_new: options[:changelog], description: options[:beta_app_description], feedback_email: options[:beta_app_feedback_email])
52
- UI.success "Successfully set the changelog and/or description for build"
53
- end
49
+ if should_update_build_information(options)
50
+ build.update_build_information!(whats_new: options[:changelog], description: options[:beta_app_description], feedback_email: options[:beta_app_feedback_email])
51
+ UI.success "Successfully set the changelog and/or description for build"
54
52
  end
55
53
 
56
54
  return if config[:skip_submission]
@@ -110,10 +108,10 @@ module Pilot
110
108
 
111
109
  # This is where we could add a check to see if encryption is required and has been updated
112
110
  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
111
 
116
112
  if options[:distribute_external]
113
+ uploaded_build.beta_review_info.demo_account_required = false
114
+ uploaded_build.submit_for_testflight_review!
117
115
  external_group = Spaceship::TestFlight::Group.default_external_group(app_id: uploaded_build.app_id)
118
116
  uploaded_build.add_group!(external_group) unless external_group.nil?
119
117
 
@@ -121,14 +119,18 @@ module Pilot
121
119
  UI.user_error!("You must specify at least one group using the `:groups` option to distribute externally")
122
120
  end
123
121
 
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)
122
+ if options[:groups]
123
+ groups = Spaceship::TestFlight::Group.filter_groups(app_id: uploaded_build.app_id) do |group|
124
+ options[:groups].include?(group.name)
125
+ end
126
+ groups.each do |group|
127
+ uploaded_build.add_group!(group)
128
+ end
129
129
  end
130
- groups.each do |group|
131
- uploaded_build.add_group!(group)
130
+ else # distribute internally
131
+ # in case any changes to export_compliance are required
132
+ if uploaded_build.export_compliance_missing?
133
+ uploaded_build.save!
132
134
  end
133
135
  end
134
136
 
@@ -65,9 +65,10 @@ module Pilot
65
65
  is_string: false,
66
66
  default_value: false),
67
67
  FastlaneCore::ConfigItem.new(key: :update_build_info_on_upload,
68
+ deprecated: true,
68
69
  short_option: "-x",
69
70
  env_name: "PILOT_UPDATE_BUILD_INFO_ON_UPLOAD",
70
- description: "Update build info immediately after validation. This will set the changelog even if PILOT_SKIP_SUBMISSION is set, but will have no effect if PILOT_SKIP_WAITING_FOR_BUILD_PROCESSING is set",
71
+ description: "Update build info immediately after validation. This is deprecated and will be removed in a future release. iTunesConnect no longer supports setting build info until after build processing has completed, which is when build info is updated by default",
71
72
  is_string: false,
72
73
  default_value: false),
73
74
  FastlaneCore::ConfigItem.new(key: :apple_id,
@@ -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
@@ -145,7 +145,7 @@ open class Snapshot: NSObject {
145
145
  print("Can't prepare environment. Simulator home location is inaccessible. Does \(simulatorHostHome) exist?")
146
146
  return nil
147
147
  }
148
- homeDir = homeDirUrl
148
+ homeDir = URL(fileURLWithPath: homeDirUrl.path)
149
149
  #endif
150
150
  return homeDir.appendingPathComponent("Library/Caches/tools.fastlane")
151
151
  }
@@ -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"
@@ -128,12 +142,20 @@ module Spaceship::TestFlight
128
142
  #
129
143
  # @raises NameError if the values are nil
130
144
  def assert_required_params(method_name, binding)
131
- parameter_names = Hash[method(method_name).parameters].values
145
+ parameter_names = method(method_name).parameters.map { |k, v| v }
132
146
  parameter_names.each do |name|
133
- if binding.local_variable_get(name).nil?
147
+ if local_variable_get(binding, name).nil?
134
148
  raise NameError, "`#{name}' is a required parameter"
135
149
  end
136
150
  end
137
151
  end
152
+
153
+ def local_variable_get(binding, name)
154
+ if binding.respond_to?(:local_variable_get)
155
+ binding.local_variable_get(name)
156
+ else
157
+ binding.eval(name.to_s)
158
+ end
159
+ end
138
160
  end
139
161
  end
@@ -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
@@ -46,6 +46,7 @@ module Spaceship
46
46
  'developerRemovedFromSale' => DEVELOPER_REMOVED_FROM_SALE,
47
47
  'waitingForReview' => WAITING_FOR_REVIEW,
48
48
  'inReview' => IN_REVIEW,
49
+ 'rejected' => REJECTED,
49
50
  'pendingDeveloperRelease' => PENDING_DEVELOPER_RELEASE,
50
51
  'metadataRejected' => METADATA_REJECTED
51
52
  }
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.28.3
4
+ version: 2.28.4
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-21 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