fastlane 2.150.0.rc4 → 2.150.0.rc5
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 +4 -4
- data/deliver/lib/deliver/download_screenshots.rb +46 -26
- data/deliver/lib/deliver/submit_for_review.rb +26 -7
- data/deliver/lib/deliver/upload_screenshots.rb +7 -1
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +4 -0
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -4
- data/pilot/lib/pilot/.manager.rb.swp +0 -0
- data/produce/lib/produce/itunes_connect.rb +29 -2
- data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/app.rb +18 -3
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +54 -1
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +26 -2
- data/spaceship/lib/spaceship/connect_api/models/user.rb +2 -1
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +9 -6
- data/spaceship/lib/spaceship/connect_api/users/users.rb +13 -0
- metadata +12 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5713ac3ee6b1f2b1d00c5575f825292626471ea0adb1d82f20963a497b565e3c
|
|
4
|
+
data.tar.gz: dbc6d60bac4cc2fbfc3e806d981ccaf4de1342b8357ff7edca3eeae981d54cc4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68c6a15af4df30d5a53e2a161f084f39188bbd293445f921fcc1f47ed4e6d6c35ea9acea25d6ad5ab73156155cfa514a0b239009b73385ce949603e3cacf8dc9
|
|
7
|
+
data.tar.gz: 6b791c19da977f7db0eb906e4dddccd4fbee7f75b098d3eff67f1bad6a249ff6a267c4082c842fd0a2cd1474d98b836d6b7a4c6278c64388f4f858f2b3b09941
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require_relative 'module'
|
|
2
|
+
require 'spaceship'
|
|
2
3
|
require 'open-uri'
|
|
3
4
|
|
|
4
5
|
module Deliver
|
|
@@ -13,35 +14,54 @@ module Deliver
|
|
|
13
14
|
end
|
|
14
15
|
|
|
15
16
|
def self.download(options, folder_path)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
screenshots.each do |screenshot|
|
|
20
|
-
file_name = [screenshot.sort_order, screenshot.device_type, screenshot.sort_order].join("_")
|
|
21
|
-
original_file_extension = File.basename(screenshot.original_file_name)
|
|
22
|
-
file_name += "." + original_file_extension
|
|
23
|
-
|
|
24
|
-
UI.message("Downloading existing screenshot '#{file_name}' for language '#{language}'")
|
|
25
|
-
|
|
26
|
-
# If the screen shot is for an appleTV we need to store it in a way that we'll know it's an appleTV
|
|
27
|
-
# screen shot later as the screen size is the same as an iPhone 6 Plus in landscape.
|
|
28
|
-
if screenshot.device_type == "appleTV"
|
|
29
|
-
containing_folder = File.join(folder_path, "appleTV", screenshot.language)
|
|
30
|
-
else
|
|
31
|
-
containing_folder = File.join(folder_path, screenshot.language)
|
|
32
|
-
end
|
|
17
|
+
legacy_app = options[:app]
|
|
18
|
+
app_id = legacy_app.apple_id
|
|
19
|
+
app = Spaceship::ConnectAPI::App.get(app_id: app_id)
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
|
22
|
+
version = if options[:use_live_version]
|
|
23
|
+
app.get_live_app_store_version(platform: platform)
|
|
24
|
+
else
|
|
25
|
+
app.get_edit_app_store_version(platform: platform)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
localizations = version.get_app_store_version_localizations
|
|
29
|
+
localizations.each do |localization|
|
|
30
|
+
screenshot_sets = localization.get_app_screenshot_sets
|
|
31
|
+
screenshot_sets.each do |screenshot_set|
|
|
32
|
+
screenshot_set.app_screenshots.each_with_index do |screenshot, index|
|
|
33
|
+
url = screenshot.image_asset_url
|
|
34
|
+
next if url.nil?
|
|
35
|
+
|
|
36
|
+
file_name = [index, screenshot_set.screenshot_display_type, index].join("_")
|
|
37
|
+
original_file_extension = File.basename(screenshot.file_name)
|
|
38
|
+
file_name += "." + original_file_extension
|
|
39
|
+
|
|
40
|
+
language = localization.locale
|
|
41
|
+
|
|
42
|
+
UI.message("Downloading existing screenshot '#{file_name}' for language '#{language}'")
|
|
43
|
+
|
|
44
|
+
# If the screen shot is for an appleTV we need to store it in a way that we'll know it's an appleTV
|
|
45
|
+
# screen shot later as the screen size is the same as an iPhone 6 Plus in landscape.
|
|
46
|
+
if screenshot_set.apple_tv?
|
|
47
|
+
containing_folder = File.join(folder_path, "appleTV", language)
|
|
48
|
+
else
|
|
49
|
+
containing_folder = File.join(folder_path, language)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if screenshot_set.imessage?
|
|
53
|
+
containing_folder = File.join(folder_path, "iMessage", language)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
begin
|
|
57
|
+
FileUtils.mkdir_p(containing_folder)
|
|
58
|
+
rescue
|
|
59
|
+
# if it's already there
|
|
60
|
+
end
|
|
37
61
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
rescue
|
|
41
|
-
# if it's already there
|
|
62
|
+
path = File.join(containing_folder, file_name)
|
|
63
|
+
File.binwrite(path, open(url).read)
|
|
42
64
|
end
|
|
43
|
-
path = File.join(containing_folder, file_name)
|
|
44
|
-
File.binwrite(path, open(screenshot.url).read)
|
|
45
65
|
end
|
|
46
66
|
end
|
|
47
67
|
end
|
|
@@ -59,6 +59,8 @@ module Deliver
|
|
|
59
59
|
|
|
60
60
|
def update_export_compliance(options, app, build)
|
|
61
61
|
submission_information = options[:submission_information] || {}
|
|
62
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
|
63
|
+
|
|
62
64
|
uses_encryption = submission_information[:export_compliance_uses_encryption]
|
|
63
65
|
|
|
64
66
|
if build.uses_non_exempt_encryption.nil?
|
|
@@ -70,6 +72,8 @@ module Deliver
|
|
|
70
72
|
"Add information to the :submission_information option...",
|
|
71
73
|
" Docs: http://docs.fastlane.tools/actions/deliver/#compliance-and-idfa-settings",
|
|
72
74
|
" Example: submission_information: { export_compliance_uses_encryption: false }",
|
|
75
|
+
" Example CLI:",
|
|
76
|
+
" --submission_information \"{\\\"export_compliance_uses_encryption\\\": false}\"",
|
|
73
77
|
"This can also be set in your Info.plist with key 'ITSAppUsesNonExemptEncryption'"
|
|
74
78
|
].join("\n")
|
|
75
79
|
UI.user_error!(message)
|
|
@@ -85,6 +89,8 @@ module Deliver
|
|
|
85
89
|
|
|
86
90
|
def update_idfa(options, app, version)
|
|
87
91
|
submission_information = options[:submission_information] || {}
|
|
92
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
|
93
|
+
|
|
88
94
|
uses_idfa = submission_information[:add_id_info_uses_idfa]
|
|
89
95
|
|
|
90
96
|
idfa_declaration = begin
|
|
@@ -93,14 +99,17 @@ module Deliver
|
|
|
93
99
|
nil
|
|
94
100
|
end
|
|
95
101
|
|
|
102
|
+
updated_idfa = false
|
|
103
|
+
|
|
96
104
|
# Set IDFA on version
|
|
97
|
-
UI.verbose("Updating app store version for IDFA status of '#{uses_idfa}'")
|
|
98
105
|
unless uses_idfa.nil?
|
|
106
|
+
UI.verbose("Updating app store version for IDFA status of '#{uses_idfa}'")
|
|
99
107
|
version = version.update(attributes: {
|
|
100
108
|
usesIdfa: uses_idfa
|
|
101
109
|
})
|
|
110
|
+
UI.verbose("Updated app store version for IDFA status of '#{version.uses_idfa}'")
|
|
111
|
+
updated_idfa = true
|
|
102
112
|
end
|
|
103
|
-
UI.verbose("Updated app store version for IDFA status of '#{version.uses_idfa}'")
|
|
104
113
|
|
|
105
114
|
# Error if uses_idfa not set
|
|
106
115
|
if version.uses_idfa.nil?
|
|
@@ -115,7 +124,9 @@ module Deliver
|
|
|
115
124
|
" add_id_info_serves_ads: false,",
|
|
116
125
|
" add_id_info_uses_idfa: false,",
|
|
117
126
|
" add_id_info_tracks_install: false",
|
|
118
|
-
" }"
|
|
127
|
+
" }",
|
|
128
|
+
" Example CLI:",
|
|
129
|
+
" --submission_information \"{\\\"add_id_info_uses_idfa\\\": false}\""
|
|
119
130
|
].join("\n")
|
|
120
131
|
UI.user_error!(message)
|
|
121
132
|
end
|
|
@@ -125,6 +136,7 @@ module Deliver
|
|
|
125
136
|
if idfa_declaration
|
|
126
137
|
UI.verbose("Deleting IDFA delcaration")
|
|
127
138
|
idfa_declaration.delete!
|
|
139
|
+
updated_idfa = true
|
|
128
140
|
UI.verbose("Deleted IDFA delcaration")
|
|
129
141
|
end
|
|
130
142
|
elsif uses_idfa == true
|
|
@@ -144,13 +156,16 @@ module Deliver
|
|
|
144
156
|
version.create_idfa_declaration(attributes: attributes)
|
|
145
157
|
UI.verbose("Created IDFA delcaration")
|
|
146
158
|
end
|
|
159
|
+
|
|
160
|
+
updated_idfa = true
|
|
147
161
|
end
|
|
148
162
|
|
|
149
|
-
UI.success("Successfully updated IDFA delcarations on App Store Connect")
|
|
163
|
+
UI.success("Successfully updated IDFA delcarations on App Store Connect") if updated_idfa
|
|
150
164
|
end
|
|
151
165
|
|
|
152
166
|
def update_submission_information(options, app)
|
|
153
167
|
submission_information = options[:submission_information] || {}
|
|
168
|
+
submission_information = submission_information.collect { |k, v| [k.to_sym, v] }.to_h
|
|
154
169
|
|
|
155
170
|
content_rights = submission_information[:content_rights_contains_third_party_content]
|
|
156
171
|
|
|
@@ -171,6 +186,7 @@ module Deliver
|
|
|
171
186
|
|
|
172
187
|
def wait_for_build_processing_to_be_complete(app: nil, platform: nil, options: nil)
|
|
173
188
|
app_version = options[:app_version]
|
|
189
|
+
|
|
174
190
|
app_version ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa]) if options[:ipa]
|
|
175
191
|
app_version ||= FastlaneCore::PkgFileAnalyser.fetch_app_version(options[:pkg]) if options[:pkg]
|
|
176
192
|
|
|
@@ -184,11 +200,14 @@ module Deliver
|
|
|
184
200
|
build_version: app_build,
|
|
185
201
|
poll_interval: 15,
|
|
186
202
|
return_when_build_appears: false,
|
|
187
|
-
return_spaceship_testflight_build: false
|
|
203
|
+
return_spaceship_testflight_build: false,
|
|
204
|
+
select_latest: true
|
|
188
205
|
)
|
|
189
206
|
|
|
190
|
-
|
|
191
|
-
|
|
207
|
+
if !app_version.nil? && !app_build.nil?
|
|
208
|
+
unless latest_build.app_version == app_version && latest_build.version == app_build
|
|
209
|
+
UI.important("Uploaded app #{app_version} - #{app_build}, but received build #{latest_build.app_version} - #{latest_build.version}.")
|
|
210
|
+
end
|
|
192
211
|
end
|
|
193
212
|
|
|
194
213
|
return latest_build
|
|
@@ -96,6 +96,12 @@ module Deliver
|
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
def upload_screenshots(screenshots_per_language, localizations)
|
|
99
|
+
# Check if should wait for processing
|
|
100
|
+
wait_for_processing = !FastlaneCore::Env.truthy?("DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING")
|
|
101
|
+
if wait_for_processing
|
|
102
|
+
UI.important("Set environment variable DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process")
|
|
103
|
+
end
|
|
104
|
+
|
|
99
105
|
# Upload screenshots
|
|
100
106
|
indized = {} # per language and device type
|
|
101
107
|
|
|
@@ -166,7 +172,7 @@ module Deliver
|
|
|
166
172
|
else
|
|
167
173
|
indized[localization.locale][set.screenshot_display_type][:count] += 1
|
|
168
174
|
UI.message("Uploading '#{screenshot.path}'...")
|
|
169
|
-
set.upload_screenshot(path: screenshot.path)
|
|
175
|
+
set.upload_screenshot(path: screenshot.path, wait_for_processing: wait_for_processing)
|
|
170
176
|
end
|
|
171
177
|
end
|
|
172
178
|
end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -435,6 +435,10 @@ Omit `build_number` to let _fastlane_ automatically select the latest build numb
|
|
|
435
435
|
|
|
436
436
|
Use the `submission_information` parameter for additional submission specifiers, including compliance and IDFA settings. Look at the Spaceship's [`app_submission.rb`](https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/tunes/app_submission.rb) file for options. See [this example](https://github.com/artsy/eigen/blob/faa02e2746194d8d7c11899474de9c517435eca4/fastlane/Fastfile#L131-L149).
|
|
437
437
|
|
|
438
|
+
```no-highlight
|
|
439
|
+
fastlane deliver submit_build --build_number 830 --submission_information "{\"export_compliance_uses_encryption\": false, \"add_id_info_uses_idfa\": false }"
|
|
440
|
+
```
|
|
441
|
+
|
|
438
442
|
# Credentials
|
|
439
443
|
|
|
440
444
|
A detailed description about how your credentials are handled is available in a [credentials_manager](https://github.com/fastlane/fastlane/tree/master/credentials_manager).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module Fastlane
|
|
2
|
-
VERSION = '2.150.0.
|
|
2
|
+
VERSION = '2.150.0.rc5'.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
|
|
Binary file
|
|
@@ -6,7 +6,7 @@ module FastlaneCore
|
|
|
6
6
|
class BuildWatcher
|
|
7
7
|
class << self
|
|
8
8
|
# @return The build we waited for. This method will always return a build
|
|
9
|
-
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true)
|
|
9
|
+
def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, app_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false, return_when_build_appears: false, return_spaceship_testflight_build: true, select_latest: false)
|
|
10
10
|
# Warn about train_version being removed in the future
|
|
11
11
|
if train_version
|
|
12
12
|
UI.deprecated(":train_version is no longer a used argument on FastlaneCore::BuildWatcher. Please use :app_version instead.")
|
|
@@ -23,7 +23,7 @@ module FastlaneCore
|
|
|
23
23
|
|
|
24
24
|
showed_info = false
|
|
25
25
|
loop do
|
|
26
|
-
matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform)
|
|
26
|
+
matched_build = matching_build(watched_app_version: app_version, watched_build_version: build_version, app_id: app_id, platform: platform, select_latest: select_latest)
|
|
27
27
|
|
|
28
28
|
if matched_build.nil? && !showed_info
|
|
29
29
|
UI.important("Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997")
|
|
@@ -55,7 +55,7 @@ module FastlaneCore
|
|
|
55
55
|
return version.instance_of?(String) ? version.split('.').map { |s| s.to_i.to_s }.join('.') : version
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil)
|
|
58
|
+
def matching_build(watched_app_version: nil, watched_build_version: nil, app_id: nil, platform: nil, select_latest: false)
|
|
59
59
|
# Get build deliveries (newly uploaded processing builds)
|
|
60
60
|
watched_app_version = remove_version_leading_zeros(version: watched_app_version)
|
|
61
61
|
watched_build_version = remove_version_leading_zeros(version: watched_build_version)
|
|
@@ -69,7 +69,7 @@ module FastlaneCore
|
|
|
69
69
|
|
|
70
70
|
# Raise error if more than 1 build is returned
|
|
71
71
|
# This should never happen but need to inform the user if it does
|
|
72
|
-
if matched_builds.size > 1
|
|
72
|
+
if matched_builds.size > 1 && !select_latest
|
|
73
73
|
error_builds = matched_builds.map do |build|
|
|
74
74
|
"#{build.app_version}(#{build.version}) for #{build.platform} - #{build.processing_state}"
|
|
75
75
|
end.join("\n")
|
|
Binary file
|
|
@@ -21,6 +21,13 @@ module Produce
|
|
|
21
21
|
UI.success("App '#{Produce.config[:app_identifier]}' already exists (#{application.id}), nothing to do on App Store Connect")
|
|
22
22
|
# Nothing to do here
|
|
23
23
|
else
|
|
24
|
+
emails = Produce.config[:itc_users] || []
|
|
25
|
+
user_ids = []
|
|
26
|
+
unless emails.empty?
|
|
27
|
+
UI.message("Verifying users exist before creating app...")
|
|
28
|
+
user_ids = find_user_ids(emails: emails)
|
|
29
|
+
end
|
|
30
|
+
|
|
24
31
|
UI.success("Creating new app '#{Produce.config[:app_name]}' on App Store Connect")
|
|
25
32
|
|
|
26
33
|
platforms = Produce.config[:platforms] || [Produce.config[:platform]]
|
|
@@ -29,7 +36,6 @@ module Produce
|
|
|
29
36
|
Spaceship::ConnectAPI::Platform.map(platform)
|
|
30
37
|
end
|
|
31
38
|
|
|
32
|
-
# Produce.config[:company_name]
|
|
33
39
|
# Produce.config[:itc_users]
|
|
34
40
|
application = Spaceship::ConnectAPI::App.create(
|
|
35
41
|
name: Produce.config[:app_name],
|
|
@@ -37,7 +43,8 @@ module Produce
|
|
|
37
43
|
sku: Produce.config[:sku].to_s,
|
|
38
44
|
primary_locale: language,
|
|
39
45
|
bundle_id: app_identifier,
|
|
40
|
-
platforms: platforms
|
|
46
|
+
platforms: platforms,
|
|
47
|
+
company_name: Produce.config[:company_name]
|
|
41
48
|
)
|
|
42
49
|
|
|
43
50
|
application = fetch_application
|
|
@@ -60,12 +67,32 @@ module Produce
|
|
|
60
67
|
application.ensure_version!(Produce.config[:app_version], platform: platform) if Produce.config[:app_version]
|
|
61
68
|
end
|
|
62
69
|
|
|
70
|
+
# Add users to app
|
|
71
|
+
unless user_ids.empty?
|
|
72
|
+
application.add_users(user_ids: user_ids)
|
|
73
|
+
UI.message("Successfuly added #{user_ids.size} #{user_ids.count == 1 ? 'user' : 'users'} to app")
|
|
74
|
+
end
|
|
75
|
+
|
|
63
76
|
UI.success("Successfully created new app '#{Produce.config[:app_name]}' on App Store Connect with ID #{application.id}")
|
|
64
77
|
end
|
|
65
78
|
|
|
66
79
|
return application.id
|
|
67
80
|
end
|
|
68
81
|
|
|
82
|
+
def find_user_ids(emails: nil)
|
|
83
|
+
emails ||= []
|
|
84
|
+
users = Spaceship::ConnectAPI::User.all.select do |user|
|
|
85
|
+
emails.include?(user.email)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
diff_emails = emails - users.map(&:email)
|
|
89
|
+
unless diff_emails.empty?
|
|
90
|
+
raise "Could not find users with emails of: #{diff_emails.join(',')}"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
return users.map(&:id)
|
|
94
|
+
end
|
|
95
|
+
|
|
69
96
|
private
|
|
70
97
|
|
|
71
98
|
def platform
|
|
Binary file
|
|
@@ -54,14 +54,15 @@ module Spaceship
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
def self.create(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil)
|
|
57
|
+
def self.create(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil, company_name: nil)
|
|
58
58
|
Spaceship::ConnectAPI.post_app(
|
|
59
59
|
name: name,
|
|
60
60
|
version_string: version_string,
|
|
61
61
|
sku: sku,
|
|
62
62
|
primary_locale: primary_locale,
|
|
63
63
|
bundle_id: bundle_id,
|
|
64
|
-
platforms: platforms
|
|
64
|
+
platforms: platforms,
|
|
65
|
+
company_name: company_name
|
|
65
66
|
)
|
|
66
67
|
end
|
|
67
68
|
|
|
@@ -153,7 +154,11 @@ module Spaceship
|
|
|
153
154
|
].join(","),
|
|
154
155
|
platform: platform
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
+
|
|
158
|
+
# Get the latest version
|
|
159
|
+
return get_app_store_versions(filter: filter, includes: includes)
|
|
160
|
+
.sort_by { |v| Gem::Version.new(v.version_string) }
|
|
161
|
+
.last
|
|
157
162
|
end
|
|
158
163
|
|
|
159
164
|
def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
|
|
@@ -231,6 +236,16 @@ module Spaceship
|
|
|
231
236
|
).all_pages
|
|
232
237
|
return resps.flat_map(&:to_models).first
|
|
233
238
|
end
|
|
239
|
+
|
|
240
|
+
#
|
|
241
|
+
# Users
|
|
242
|
+
#
|
|
243
|
+
|
|
244
|
+
def add_users(user_ids: nil)
|
|
245
|
+
user_ids.each do |user_id|
|
|
246
|
+
Spaceship::ConnectAPI.add_user_visible_apps(user_id: user_id, app_ids: [id])
|
|
247
|
+
end
|
|
248
|
+
end
|
|
234
249
|
end
|
|
235
250
|
end
|
|
236
251
|
end
|
|
@@ -37,12 +37,42 @@ module Spaceship
|
|
|
37
37
|
(asset_delivery_state || {})["state"] == "COMPLETE"
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
def error?
|
|
41
|
+
(asset_delivery_state || {})["state"] == "FAILED"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def error_messages
|
|
45
|
+
errors = (asset_delivery_state || {})["errors"]
|
|
46
|
+
(errors || []).map do |error|
|
|
47
|
+
[error["code"], error["description"]].compact.join(" - ")
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# This does not download the source image (exact image that was uploaded)
|
|
52
|
+
# This downloads a modified version.
|
|
53
|
+
# This image won't have the same checksums as source_file_checksum.
|
|
54
|
+
#
|
|
55
|
+
# There is an open radar for allowing downloading of source file.
|
|
56
|
+
# https://openradar.appspot.com/radar?id=4980344105205760
|
|
57
|
+
def image_asset_url(width: nil, height: nil, type: "png")
|
|
58
|
+
return nil if image_asset.nil?
|
|
59
|
+
|
|
60
|
+
template_url = image_asset["templateUrl"]
|
|
61
|
+
width ||= image_asset["width"]
|
|
62
|
+
height ||= image_asset["height"]
|
|
63
|
+
|
|
64
|
+
return template_url
|
|
65
|
+
.gsub("{w}", width.to_s)
|
|
66
|
+
.gsub("{h}", height.to_s)
|
|
67
|
+
.gsub("{f}", type)
|
|
68
|
+
end
|
|
69
|
+
|
|
40
70
|
#
|
|
41
71
|
# API
|
|
42
72
|
#
|
|
43
73
|
#
|
|
44
74
|
|
|
45
|
-
def self.create(app_screenshot_set_id: nil, path: nil)
|
|
75
|
+
def self.create(app_screenshot_set_id: nil, path: nil, wait_for_processing: true)
|
|
46
76
|
require 'faraday'
|
|
47
77
|
|
|
48
78
|
filename = File.basename(path)
|
|
@@ -70,6 +100,9 @@ module Spaceship
|
|
|
70
100
|
sourceFileChecksum: Digest::MD5.hexdigest(bytes)
|
|
71
101
|
}
|
|
72
102
|
|
|
103
|
+
# Patch screenshot that file upload is complete
|
|
104
|
+
# Catch error if patch retries due to 504. Origal patch
|
|
105
|
+
# may go through by return response as 504.
|
|
73
106
|
begin
|
|
74
107
|
screenshot = Spaceship::ConnectAPI.patch_app_screenshot(
|
|
75
108
|
app_screenshot_id: screenshot.id,
|
|
@@ -82,6 +115,26 @@ module Spaceship
|
|
|
82
115
|
raise error unless screenshot.complete?
|
|
83
116
|
end
|
|
84
117
|
|
|
118
|
+
# Wait for processing
|
|
119
|
+
if wait_for_processing
|
|
120
|
+
loop do
|
|
121
|
+
if screenshot.complete?
|
|
122
|
+
puts("Screenshot processing complete!") if Spaceship::Globals.verbose?
|
|
123
|
+
break
|
|
124
|
+
elsif screenshot.error?
|
|
125
|
+
messages = ["Error processing screenshot '#{screenshot.file_name}'"] + screenshot.error_messages
|
|
126
|
+
raise messages.join(". ")
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Poll every 2 seconds
|
|
130
|
+
sleep_time = 2
|
|
131
|
+
puts("Waiting #{sleep_time} seconds before checking status of processing...") if Spaceship::Globals.verbose?
|
|
132
|
+
sleep(sleep_time)
|
|
133
|
+
|
|
134
|
+
screenshot = Spaceship::ConnectAPI.get_app_screenshot(app_screenshot_id: screenshot.id).first
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
85
138
|
return screenshot
|
|
86
139
|
end
|
|
87
140
|
|
|
@@ -39,8 +39,24 @@ module Spaceship
|
|
|
39
39
|
APP_WATCH_SERIES_3 = "APP_WATCH_SERIES_3"
|
|
40
40
|
APP_WATCH_SERIES_4 = "APP_WATCH_SERIES_4"
|
|
41
41
|
|
|
42
|
+
APP_APPLE_TV = "APP_APPLE_TV"
|
|
43
|
+
|
|
42
44
|
APP_DESKTOP = "APP_DESKTOP"
|
|
43
45
|
|
|
46
|
+
ALL_IMESSAGE = [
|
|
47
|
+
IMESSAGE_APP_IPHONE_40,
|
|
48
|
+
IMESSAGE_APP_IPHONE_47,
|
|
49
|
+
IMESSAGE_APP_IPHONE_55,
|
|
50
|
+
IMESSAGE_APP_IPHONE_58,
|
|
51
|
+
IMESSAGE_APP_IPHONE_65,
|
|
52
|
+
|
|
53
|
+
IMESSAGE_APP_IPAD_97,
|
|
54
|
+
IMESSAGE_APP_IPAD_105,
|
|
55
|
+
IMESSAGE_APP_IPAD_PRO_129,
|
|
56
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_11,
|
|
57
|
+
IMESSAGE_APP_IPAD_PRO_3GEN_129
|
|
58
|
+
]
|
|
59
|
+
|
|
44
60
|
ALL = [
|
|
45
61
|
APP_IPHONE_35,
|
|
46
62
|
APP_IPHONE_40,
|
|
@@ -84,6 +100,14 @@ module Spaceship
|
|
|
84
100
|
return "appScreenshotSets"
|
|
85
101
|
end
|
|
86
102
|
|
|
103
|
+
def apple_tv?
|
|
104
|
+
DisplayType::APP_APPLE_TV == screenshot_display_type
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def imessage?
|
|
108
|
+
DisplayType::ALL_IMESSAGE.include?(screenshot_display_type)
|
|
109
|
+
end
|
|
110
|
+
|
|
87
111
|
#
|
|
88
112
|
# API
|
|
89
113
|
#
|
|
@@ -93,8 +117,8 @@ module Spaceship
|
|
|
93
117
|
return resp.to_models
|
|
94
118
|
end
|
|
95
119
|
|
|
96
|
-
def upload_screenshot(path: nil)
|
|
97
|
-
return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path)
|
|
120
|
+
def upload_screenshot(path: nil, wait_for_processing: true)
|
|
121
|
+
return Spaceship::ConnectAPI::AppScreenshot.create(app_screenshot_set_id: id, path: path, wait_for_processing: wait_for_processing)
|
|
98
122
|
end
|
|
99
123
|
end
|
|
100
124
|
end
|
|
@@ -39,7 +39,8 @@ module Spaceship
|
|
|
39
39
|
#
|
|
40
40
|
|
|
41
41
|
def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
|
|
42
|
-
|
|
42
|
+
resps = Spaceship::ConnectAPI.get_users(filter: filter, includes: includes).all_pages
|
|
43
|
+
return resps.flat_map(&:to_models)
|
|
43
44
|
end
|
|
44
45
|
|
|
45
46
|
def self.find(email: nil, includes: nil)
|
|
@@ -28,7 +28,7 @@ module Spaceship
|
|
|
28
28
|
# app
|
|
29
29
|
#
|
|
30
30
|
|
|
31
|
-
def post_app(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil)
|
|
31
|
+
def post_app(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil, company_name: nil)
|
|
32
32
|
included = []
|
|
33
33
|
included << {
|
|
34
34
|
type: "appInfos",
|
|
@@ -103,14 +103,17 @@ module Spaceship
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
app_attributes = {
|
|
107
|
+
sku: sku,
|
|
108
|
+
primaryLocale: primary_locale,
|
|
109
|
+
bundleId: bundle_id
|
|
110
|
+
}
|
|
111
|
+
app_attributes[:companyName] = company_name if company_name
|
|
112
|
+
|
|
106
113
|
body = {
|
|
107
114
|
data: {
|
|
108
115
|
type: "apps",
|
|
109
|
-
attributes:
|
|
110
|
-
sku: sku,
|
|
111
|
-
primaryLocale: primary_locale,
|
|
112
|
-
bundleId: bundle_id
|
|
113
|
-
},
|
|
116
|
+
attributes: app_attributes,
|
|
114
117
|
relationships: relationships
|
|
115
118
|
},
|
|
116
119
|
included: included
|
|
@@ -11,6 +11,19 @@ module Spaceship
|
|
|
11
11
|
params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
|
12
12
|
Client.instance.get("users", params)
|
|
13
13
|
end
|
|
14
|
+
|
|
15
|
+
def add_user_visible_apps(user_id: nil, app_ids: nil)
|
|
16
|
+
body = {
|
|
17
|
+
data: app_ids.map do |app_id|
|
|
18
|
+
{
|
|
19
|
+
type: "apps",
|
|
20
|
+
id: app_id
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Client.instance.post("users/#{user_id}/relationships/visibleApps", body)
|
|
26
|
+
end
|
|
14
27
|
end
|
|
15
28
|
end
|
|
16
29
|
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.150.0.
|
|
4
|
+
version: 2.150.0.rc5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Manu Wallner
|
|
@@ -26,10 +26,10 @@ authors:
|
|
|
26
26
|
- Aaron Brager
|
|
27
27
|
- Josh Holtz
|
|
28
28
|
- Joshua Liebowitz
|
|
29
|
-
autorequire:
|
|
29
|
+
autorequire:
|
|
30
30
|
bindir: bin
|
|
31
31
|
cert_chain: []
|
|
32
|
-
date: 2020-06-
|
|
32
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: slack-notifier
|
|
@@ -1013,6 +1013,9 @@ files:
|
|
|
1013
1013
|
- fastlane/lib/fastlane.rb
|
|
1014
1014
|
- fastlane/lib/fastlane/action.rb
|
|
1015
1015
|
- fastlane/lib/fastlane/action_collector.rb
|
|
1016
|
+
- fastlane/lib/fastlane/actions/.hockey.rb.swp
|
|
1017
|
+
- fastlane/lib/fastlane/actions/.slack.rb.swp
|
|
1018
|
+
- fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp
|
|
1016
1019
|
- fastlane/lib/fastlane/actions/README.md
|
|
1017
1020
|
- fastlane/lib/fastlane/actions/actions_helper.rb
|
|
1018
1021
|
- fastlane/lib/fastlane/actions/adb.rb
|
|
@@ -1349,6 +1352,7 @@ files:
|
|
|
1349
1352
|
- fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj
|
|
1350
1353
|
- fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
|
1351
1354
|
- fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
|
|
1355
|
+
- fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate
|
|
1352
1356
|
- fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme
|
|
1353
1357
|
- fastlane/swift/FastlaneSwiftRunner/README.txt
|
|
1354
1358
|
- fastlane/swift/Gymfile.swift
|
|
@@ -1505,6 +1509,7 @@ files:
|
|
|
1505
1509
|
- pem/lib/pem/options.rb
|
|
1506
1510
|
- pilot/README.md
|
|
1507
1511
|
- pilot/lib/pilot.rb
|
|
1512
|
+
- pilot/lib/pilot/.manager.rb.swp
|
|
1508
1513
|
- pilot/lib/pilot/build_manager.rb
|
|
1509
1514
|
- pilot/lib/pilot/commands_generator.rb
|
|
1510
1515
|
- pilot/lib/pilot/features.rb
|
|
@@ -1632,12 +1637,12 @@ files:
|
|
|
1632
1637
|
- spaceship/lib/assets/languageMapping.json
|
|
1633
1638
|
- spaceship/lib/assets/languageMappingReadable.json
|
|
1634
1639
|
- spaceship/lib/spaceship.rb
|
|
1635
|
-
- spaceship/lib/spaceship/.DS_Store
|
|
1636
1640
|
- spaceship/lib/spaceship/babosa_fix.rb
|
|
1637
1641
|
- spaceship/lib/spaceship/base.rb
|
|
1638
1642
|
- spaceship/lib/spaceship/client.rb
|
|
1639
1643
|
- spaceship/lib/spaceship/commands_generator.rb
|
|
1640
1644
|
- spaceship/lib/spaceship/connect_api.rb
|
|
1645
|
+
- spaceship/lib/spaceship/connect_api/.DS_Store
|
|
1641
1646
|
- spaceship/lib/spaceship/connect_api/client.rb
|
|
1642
1647
|
- spaceship/lib/spaceship/connect_api/file_uploader.rb
|
|
1643
1648
|
- spaceship/lib/spaceship/connect_api/model.rb
|
|
@@ -1809,7 +1814,7 @@ licenses:
|
|
|
1809
1814
|
- MIT
|
|
1810
1815
|
metadata:
|
|
1811
1816
|
docs_url: https://docs.fastlane.tools
|
|
1812
|
-
post_install_message:
|
|
1817
|
+
post_install_message:
|
|
1813
1818
|
rdoc_options: []
|
|
1814
1819
|
require_paths:
|
|
1815
1820
|
- credentials_manager/lib
|
|
@@ -1841,8 +1846,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1841
1846
|
- !ruby/object:Gem::Version
|
|
1842
1847
|
version: 1.3.1
|
|
1843
1848
|
requirements: []
|
|
1844
|
-
rubygems_version: 3.0.
|
|
1845
|
-
signing_key:
|
|
1849
|
+
rubygems_version: 3.0.3
|
|
1850
|
+
signing_key:
|
|
1846
1851
|
specification_version: 4
|
|
1847
1852
|
summary: The easiest way to automate beta deployments and releases for your iOS and
|
|
1848
1853
|
Android apps
|