fastlane 2.157.0 → 2.158.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +72 -72
- data/deliver/lib/deliver/app_screenshot_iterator.rb +1 -1
- data/deliver/lib/deliver/runner.rb +5 -3
- data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/{.git_commit.rb.swp → .slack.rb.swp} +0 -0
- data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -8
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +89 -68
- data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -2
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Deliverfile.swift +1 -1
- data/fastlane/swift/DeliverfileProtocol.swift +1 -1
- data/fastlane/swift/Fastlane.swift +18 -12
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/fastlane/swift/Gymfile.swift +1 -1
- data/fastlane/swift/GymfileProtocol.swift +1 -1
- data/fastlane/swift/Matchfile.swift +1 -1
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/Precheckfile.swift +1 -1
- data/fastlane/swift/PrecheckfileProtocol.swift +5 -1
- data/fastlane/swift/Scanfile.swift +1 -1
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/Screengrabfile.swift +1 -1
- data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
- data/fastlane/swift/Snapshotfile.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
- data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -0
- data/match/lib/match/spaceship_ensure.rb +5 -5
- data/{fastlane/lib/fastlane/.erb_template_helper.rb.swp → pilot/lib/pilot/.manager.rb.swp} +0 -0
- data/pilot/lib/pilot/build_manager.rb +0 -3
- data/pilot/lib/pilot/manager.rb +1 -1
- data/precheck/lib/precheck/options.rb +9 -0
- data/precheck/lib/precheck/rule_processor.rb +94 -60
- data/precheck/lib/precheck/runner.rb +6 -4
- data/produce/lib/produce/itunes_connect.rb +3 -2
- data/screengrab/lib/screengrab/runner.rb +28 -10
- data/sigh/lib/assets/resign.sh +9 -6
- data/sigh/lib/sigh/runner.rb +3 -2
- data/spaceship/lib/spaceship/client.rb +1 -0
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +32 -13
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +5 -5
- data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +21 -0
- data/spaceship/lib/spaceship/connect_api/spaceship.rb +10 -6
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -50
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +20 -0
- metadata +25 -21
@@ -19,9 +19,10 @@ module Precheck
|
|
19
19
|
title: "Summary for precheck #{Fastlane::VERSION}")
|
20
20
|
|
21
21
|
unless Spaceship::Tunes.client
|
22
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
23
|
+
# Prompts select team if multiple teams and none specified
|
22
24
|
UI.message("Starting login with user '#{Precheck.config[:username]}'")
|
23
|
-
Spaceship::
|
24
|
-
Spaceship::Tunes.select_team
|
25
|
+
Spaceship::ConnectAPI.login(Precheck.config[:username], use_portal: false, use_tunes: true)
|
25
26
|
|
26
27
|
UI.message("Successfully logged in")
|
27
28
|
end
|
@@ -160,11 +161,12 @@ module Precheck
|
|
160
161
|
end
|
161
162
|
|
162
163
|
def app
|
163
|
-
Spaceship::
|
164
|
+
Spaceship::ConnectAPI::App.find(Precheck.config[:app_identifier])
|
164
165
|
end
|
165
166
|
|
166
167
|
def latest_app_version
|
167
|
-
|
168
|
+
platform = Spaceship::ConnectAPI::Platform.map(Precheck.config[:platform])
|
169
|
+
@latest_version ||= app.get_edit_app_store_version(platform: platform)
|
168
170
|
end
|
169
171
|
|
170
172
|
# Makes sure the current App ID exists. If not, it will show an appropriate error message
|
@@ -9,8 +9,9 @@ module Produce
|
|
9
9
|
@full_bundle_identifier = app_identifier
|
10
10
|
@full_bundle_identifier.gsub!('*', Produce.config[:bundle_identifier_suffix].to_s) if wildcard_bundle?
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
13
|
+
# Prompts select team if multiple teams and none specified
|
14
|
+
Spaceship::ConnectAPI.login(Produce.config[:username], nil, use_portal: false, use_tunes: true)
|
14
15
|
|
15
16
|
create_new_app
|
16
17
|
end
|
@@ -82,7 +82,7 @@ module Screengrab
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def select_device
|
85
|
-
adb = Fastlane::Helper::AdbHelper.new(adb_host: @config[:adb_host])
|
85
|
+
adb = Fastlane::Helper::AdbHelper.new(adb_path: @android_env.adb_path, adb_host: @config[:adb_host])
|
86
86
|
devices = adb.load_all_devices
|
87
87
|
|
88
88
|
UI.user_error!('There are no connected and authorized devices or emulators') if devices.empty?
|
@@ -299,9 +299,17 @@ module Screengrab
|
|
299
299
|
device_screenshots_paths.each do |device_path|
|
300
300
|
if_device_path_exists(@config[:app_package_name], device_serial, device_path) do |path|
|
301
301
|
next unless path.include?(locale)
|
302
|
-
run_adb_command("-s #{device_serial} pull #{path} #{tempdir}",
|
303
|
-
|
304
|
-
|
302
|
+
out = run_adb_command("-s #{device_serial} pull #{path} #{tempdir}",
|
303
|
+
print_all: false,
|
304
|
+
print_command: true,
|
305
|
+
raise_errors: false)
|
306
|
+
if out =~ /Permission denied/
|
307
|
+
dir = File.dirname(path)
|
308
|
+
base = File.basename(path)
|
309
|
+
run_adb_command("-s #{device_serial} shell run-as #{@config[:app_package_name]} 'tar -cC #{dir} #{base}' | tar -xvC #{tempdir}",
|
310
|
+
print_all: false,
|
311
|
+
print_command: true)
|
312
|
+
end
|
305
313
|
end
|
306
314
|
end
|
307
315
|
|
@@ -381,16 +389,26 @@ module Screengrab
|
|
381
389
|
packages.split("\n").map { |package| package.gsub("package:", "") }
|
382
390
|
end
|
383
391
|
|
384
|
-
def run_adb_command(command, print_all: false, print_command: false)
|
392
|
+
def run_adb_command(command, print_all: false, print_command: false, raise_errors: true)
|
385
393
|
adb_path = @android_env.adb_path.chomp("adb")
|
386
394
|
adb_host = @config[:adb_host]
|
387
395
|
host = adb_host.nil? ? '' : "-H #{adb_host} "
|
388
|
-
output =
|
389
|
-
|
390
|
-
|
396
|
+
output = ''
|
397
|
+
begin
|
398
|
+
errout = nil
|
399
|
+
cmdout = @executor.execute(command: adb_path + "adb " + host + command,
|
400
|
+
print_all: print_all,
|
401
|
+
print_command: print_command,
|
402
|
+
error: raise_errors ? nil : proc { |out, status| errout = out }) || ''
|
403
|
+
output = errout || cmdout
|
404
|
+
rescue => ex
|
405
|
+
if raise_errors
|
406
|
+
raise ex
|
407
|
+
end
|
408
|
+
end
|
391
409
|
output.lines.reject do |line|
|
392
|
-
# Debug/Warning output from ADB
|
393
|
-
line.start_with?('adb: ')
|
410
|
+
# Debug/Warning output from ADB
|
411
|
+
line.start_with?('adb: ') && !line.start_with?('adb: error: ')
|
394
412
|
end.join('') # Lines retain their newline chars
|
395
413
|
end
|
396
414
|
|
data/sigh/lib/assets/resign.sh
CHANGED
@@ -72,6 +72,9 @@
|
|
72
72
|
# new features June 2020
|
73
73
|
# 1. enable (re)signing of OnDemandResources when ipa has been built for the appstore
|
74
74
|
#
|
75
|
+
# new features August 2020
|
76
|
+
# 1. fixes usage for users with GNU-sed in their $PATH
|
77
|
+
#
|
75
78
|
|
76
79
|
# Logging functions
|
77
80
|
|
@@ -762,7 +765,7 @@ function resign {
|
|
762
765
|
|
763
766
|
# Get the entry from app's entitlements
|
764
767
|
# Read it with PlistBuddy as XML, then strip the header and <plist></plist> part
|
765
|
-
ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
|
768
|
+
ENTITLEMENTS_VALUE="$(PlistBuddy -x -c "Print $KEY" "$APP_ENTITLEMENTS" 2>/dev/null | /usr/bin/sed -e 's,.*<plist[^>]*>\(.*\)</plist>,\1,g')"
|
766
769
|
if [[ -z "$ENTITLEMENTS_VALUE" ]]; then
|
767
770
|
log "No value for '$KEY'"
|
768
771
|
continue
|
@@ -780,7 +783,7 @@ function resign {
|
|
780
783
|
log "Certificate $CERTIFICATE matches a SHA1 pattern"
|
781
784
|
local certificate_matches="$( security find-identity -v -p codesigning | grep -m 1 "$CERTIFICATE" )"
|
782
785
|
if [ -n "$certificate_matches" ]; then
|
783
|
-
certificate_name="$(
|
786
|
+
certificate_name="$(/usr/bin/sed -E s/[^\"]+\"\([^\"]+\)\".*/\\1/ <<< $certificate_matches )"
|
784
787
|
log "Certificate name: $certificate_name"
|
785
788
|
fi
|
786
789
|
fi
|
@@ -807,18 +810,18 @@ function resign {
|
|
807
810
|
# otherwise it interprets they key path as nested keys
|
808
811
|
# TODO: Should be able to replace with echo ${KEY//\./\\\\.} and remove shellcheck disable directive
|
809
812
|
# shellcheck disable=SC2001
|
810
|
-
PLUTIL_KEY=$(echo "$KEY" | sed 's/\./\\\./g')
|
813
|
+
PLUTIL_KEY=$(echo "$KEY" | /usr/bin/sed 's/\./\\\./g')
|
811
814
|
plutil -insert "$PLUTIL_KEY" -xml "$ENTITLEMENTS_VALUE" "$PATCHED_ENTITLEMENTS"
|
812
815
|
|
813
816
|
# Patch the ID value if specified
|
814
817
|
if [[ "$ID_TYPE" == "APP_ID" ]]; then
|
815
818
|
# Replace old value with new value in patched entitlements
|
816
819
|
log "Replacing old app identifier prefix '$OLD_APP_ID' with new value '$NEW_APP_ID'"
|
817
|
-
sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
|
820
|
+
/usr/bin/sed -i .bak "s/$OLD_APP_ID/$NEW_APP_ID/g" "$PATCHED_ENTITLEMENTS"
|
818
821
|
elif [[ "$ID_TYPE" == "TEAM_ID" ]]; then
|
819
822
|
# Replace old team identifier with new value
|
820
823
|
log "Replacing old team ID '$OLD_TEAM_ID' with new team ID: '$NEW_TEAM_ID'"
|
821
|
-
sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
|
824
|
+
/usr/bin/sed -i .bak "s/$OLD_TEAM_ID/$NEW_TEAM_ID/g" "$PATCHED_ENTITLEMENTS"
|
822
825
|
else
|
823
826
|
continue
|
824
827
|
fi
|
@@ -835,7 +838,7 @@ function resign {
|
|
835
838
|
# e.g. <string>AB1GP98Q19.com.example.foo</string>
|
836
839
|
# vs
|
837
840
|
# com.example.foo
|
838
|
-
sed -i .bak "s!${OLD_BUNDLE_ID}</string>!${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
841
|
+
/usr/bin/sed -i .bak "s!${OLD_BUNDLE_ID}</string>!${NEW_BUNDLE_ID}</string>!g" "$PATCHED_ENTITLEMENTS"
|
839
842
|
|
840
843
|
log "Resigning application using certificate: '$CERTIFICATE'"
|
841
844
|
log "and patched entitlements:"
|
data/sigh/lib/sigh/runner.rb
CHANGED
@@ -17,9 +17,10 @@ module Sigh
|
|
17
17
|
hide_keys: [:output_path],
|
18
18
|
title: "Summary for sigh #{Fastlane::VERSION}")
|
19
19
|
|
20
|
+
# Team selection passed though FASTLANE_ITC_TEAM_ID and FASTLANE_ITC_TEAM_NAME environment variables
|
21
|
+
# Prompts select team if multiple teams and none specified
|
20
22
|
UI.message("Starting login with user '#{Sigh.config[:username]}'")
|
21
|
-
Spaceship::ConnectAPI.login(Sigh.config[:username], nil)
|
22
|
-
Spaceship::ConnectAPI.select_team
|
23
|
+
Spaceship::ConnectAPI.login(Sigh.config[:username], nil, use_portal: true, use_tunes: false)
|
23
24
|
UI.message("Successfully logged in")
|
24
25
|
|
25
26
|
profiles = [] if Sigh.config[:skip_fetch_profiles]
|
@@ -39,6 +39,7 @@ require 'spaceship/connect_api/models/app_info_localization'
|
|
39
39
|
require 'spaceship/connect_api/models/app_preview_set'
|
40
40
|
require 'spaceship/connect_api/models/app_preview'
|
41
41
|
require 'spaceship/connect_api/models/app_price'
|
42
|
+
require 'spaceship/connect_api/models/app_price_point'
|
42
43
|
require 'spaceship/connect_api/models/app_price_tier'
|
43
44
|
require 'spaceship/connect_api/models/app_store_review_attachment'
|
44
45
|
require 'spaceship/connect_api/models/app_store_review_detail'
|
Binary file
|
@@ -38,21 +38,30 @@ module Spaceship
|
|
38
38
|
#
|
39
39
|
# @param user (String) (optional): The username (usually the email address)
|
40
40
|
# @param password (String) (optional): The password
|
41
|
-
# @param
|
41
|
+
# @param use_portal (Boolean) (optional): Whether to log in to Spaceship::Portal or not
|
42
|
+
# @param use_tunes (Boolean) (optional): Whether to log in to Spaceship::Tunes or not
|
43
|
+
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
44
|
+
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
42
45
|
# @param team_name (String) (optional): The team name
|
43
46
|
#
|
44
47
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
45
48
|
#
|
46
49
|
# @return (Spaceship::ConnectAPI::Client) The client the login method was called for
|
47
|
-
def self.login(user = nil, password = nil,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil)
|
51
|
+
portal_client = Spaceship::Portal.login(user, password) if use_portal
|
52
|
+
tunes_client = Spaceship::Tunes.login(user, password) if use_tunes
|
53
|
+
|
54
|
+
# Check if environment variables are set for Spaceship::Portal or Spaceship::Tunes to select team
|
55
|
+
portal_team_id ||= ENV['FASTLANE_TEAM_ID']
|
56
|
+
portal_team_name = team_name || ENV['FASTLANE_TEAM_NAME']
|
57
|
+
tunes_team_id ||= ENV['FASTLANE_ITC_TEAM_ID']
|
58
|
+
tunes_team_name = team_name || ENV['FASTLANE_ITC_TEAM_NAME']
|
59
|
+
|
60
|
+
# The clients will prompt for a team selection if:
|
61
|
+
# 1. client exists
|
62
|
+
# 2. team_id and team_name are nil and user belongs to multiple teams
|
63
|
+
portal_client.select_team(team_id: portal_team_id, team_name: portal_team_name) if portal_client
|
64
|
+
tunes_client.select_team(team_id: tunes_team_id, team_name: tunes_team_name) if tunes_client
|
56
65
|
|
57
66
|
return ConnectAPI::Client.new(tunes_client: tunes_client, portal_client: portal_client)
|
58
67
|
end
|
@@ -84,6 +93,16 @@ module Spaceship
|
|
84
93
|
)
|
85
94
|
end
|
86
95
|
|
96
|
+
def portal_team_id
|
97
|
+
return nil if @portal_client.nil?
|
98
|
+
return @portal_client.team_id
|
99
|
+
end
|
100
|
+
|
101
|
+
def tunes_team_id
|
102
|
+
return nil if @tunes_client.nil?
|
103
|
+
return @tunes_client.team_id
|
104
|
+
end
|
105
|
+
|
87
106
|
def in_house?
|
88
107
|
if token
|
89
108
|
if token.in_house.nil?
|
@@ -104,9 +123,9 @@ module Spaceship
|
|
104
123
|
end
|
105
124
|
end
|
106
125
|
|
107
|
-
def select_team(
|
108
|
-
@
|
109
|
-
@
|
126
|
+
def select_team(portal_team_id: nil, tunes_team_id: nil, team_name: nil)
|
127
|
+
@portal_client.select_team(team_id: portal_team_id, team_name: team_name) unless @portal_client.nil?
|
128
|
+
@tunes_client.select_team(team_id: tunes_team_id, team_name: team_name) unless @tunes_client.nil?
|
110
129
|
|
111
130
|
# Updating the tunes and portal clients requires resetting
|
112
131
|
# of the clients in the API modules
|
@@ -192,7 +192,7 @@ module Spaceship
|
|
192
192
|
.last
|
193
193
|
end
|
194
194
|
|
195
|
-
def get_live_app_store_version(platform: nil, includes:
|
195
|
+
def get_live_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
196
196
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
197
197
|
filter = {
|
198
198
|
appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE,
|
@@ -201,7 +201,7 @@ module Spaceship
|
|
201
201
|
return get_app_store_versions(filter: filter, includes: includes).first
|
202
202
|
end
|
203
203
|
|
204
|
-
def get_edit_app_store_version(platform: nil, includes:
|
204
|
+
def get_edit_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
205
205
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
206
206
|
filter = {
|
207
207
|
appStoreState: [
|
@@ -221,7 +221,7 @@ module Spaceship
|
|
221
221
|
.last
|
222
222
|
end
|
223
223
|
|
224
|
-
def get_in_review_app_store_version(platform: nil, includes:
|
224
|
+
def get_in_review_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
225
225
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
226
226
|
filter = {
|
227
227
|
appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
|
@@ -230,7 +230,7 @@ module Spaceship
|
|
230
230
|
return get_app_store_versions(filter: filter, includes: includes).first
|
231
231
|
end
|
232
232
|
|
233
|
-
def get_pending_release_app_store_version(platform: nil, includes:
|
233
|
+
def get_pending_release_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
|
234
234
|
platform ||= Spaceship::ConnectAPI::Platform::IOS
|
235
235
|
filter = {
|
236
236
|
appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE,
|
@@ -239,7 +239,7 @@ module Spaceship
|
|
239
239
|
return get_app_store_versions(filter: filter, includes: includes).first
|
240
240
|
end
|
241
241
|
|
242
|
-
def get_app_store_versions(filter: {}, includes:
|
242
|
+
def get_app_store_versions(filter: {}, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES, limit: nil, sort: nil)
|
243
243
|
resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
|
244
244
|
return resps.flat_map(&:to_models)
|
245
245
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative '../model'
|
2
|
+
module Spaceship
|
3
|
+
class ConnectAPI
|
4
|
+
class AppPricePoint
|
5
|
+
include Spaceship::ConnectAPI::Model
|
6
|
+
|
7
|
+
attr_accessor :customer_price
|
8
|
+
|
9
|
+
attr_accessor :proceeds
|
10
|
+
|
11
|
+
attr_accessor :price_tier
|
12
|
+
attr_accessor :territory
|
13
|
+
|
14
|
+
attr_mapping({
|
15
|
+
"customerPrice" => "customer_price",
|
16
|
+
"proceeds" => "proceeds",
|
17
|
+
"priceTier" => "price_tier",
|
18
|
+
"territory" => "territory"
|
19
|
+
})
|
20
|
+
|
21
|
+
def self.type
|
22
|
+
return "appPricePoints"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -55,9 +55,15 @@ module Spaceship
|
|
55
55
|
"downloadable" => "downloadable",
|
56
56
|
"createdDate" => "created_date",
|
57
57
|
|
58
|
-
"appStoreVersionSubmission" => "app_store_version_submission"
|
58
|
+
"appStoreVersionSubmission" => "app_store_version_submission",
|
59
|
+
"build" => "build"
|
59
60
|
})
|
60
61
|
|
62
|
+
ESSENTIAL_INCLUDES = [
|
63
|
+
"appStoreVersionSubmission",
|
64
|
+
"build"
|
65
|
+
].join(",")
|
66
|
+
|
61
67
|
def self.type
|
62
68
|
return "appStoreVersions"
|
63
69
|
end
|
@@ -11,6 +11,9 @@ module Spaceship
|
|
11
11
|
|
12
12
|
module PhasedReleaseState
|
13
13
|
INACTIVE = "INACTIVE"
|
14
|
+
ACTIVE = "ACTIVE"
|
15
|
+
PAUSED = "PAUSED"
|
16
|
+
COMPLETE = "COMPLETE"
|
14
17
|
end
|
15
18
|
|
16
19
|
attr_mapping({
|
@@ -28,9 +31,27 @@ module Spaceship
|
|
28
31
|
# API
|
29
32
|
#
|
30
33
|
|
34
|
+
def pause
|
35
|
+
update(PhasedReleaseState::PAUSED)
|
36
|
+
end
|
37
|
+
|
38
|
+
def resume
|
39
|
+
update(PhasedReleaseState::ACTIVE)
|
40
|
+
end
|
41
|
+
|
42
|
+
def complete
|
43
|
+
update(PhasedReleaseState::COMPLETE)
|
44
|
+
end
|
45
|
+
|
31
46
|
def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
|
32
47
|
Spaceship::ConnectAPI.delete_app_store_version_phased_release(app_store_version_phased_release_id: id)
|
33
48
|
end
|
49
|
+
|
50
|
+
private def update(state)
|
51
|
+
Spaceship::ConnectAPI.patch_app_store_version_phased_release(app_store_version_phased_release_id: id, attributes: {
|
52
|
+
phasedReleaseState: state
|
53
|
+
}).to_models.first
|
54
|
+
end
|
34
55
|
end
|
35
56
|
end
|
36
57
|
end
|
@@ -68,14 +68,17 @@ module Spaceship
|
|
68
68
|
#
|
69
69
|
# @param user (String) (optional): The username (usually the email address)
|
70
70
|
# @param password (String) (optional): The password
|
71
|
-
# @param
|
71
|
+
# @param use_portal (Boolean) (optional): Whether to log in to Spaceship::Portal or not
|
72
|
+
# @param use_tunes (Boolean) (optional): Whether to log in to Spaceship::Tunes or not
|
73
|
+
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
74
|
+
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
72
75
|
# @param team_name (String) (optional): The team name
|
73
76
|
#
|
74
77
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
75
78
|
#
|
76
79
|
# @return (Spaceship::ConnectAPI::Client) The client the login method was called for
|
77
|
-
def login(user = nil, password = nil,
|
78
|
-
@client = ConnectAPI::Client.login(user, password,
|
80
|
+
def login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil)
|
81
|
+
@client = ConnectAPI::Client.login(user, password, use_portal: use_portal, use_tunes: use_tunes, portal_team_id: portal_team_id, tunes_team_id: tunes_team_id, team_name: team_name)
|
79
82
|
end
|
80
83
|
|
81
84
|
# Open up the team selection for the user (if necessary).
|
@@ -83,11 +86,12 @@ module Spaceship
|
|
83
86
|
# If the user is in multiple teams, a team selection is shown.
|
84
87
|
# The user can then select a team by entering the number
|
85
88
|
#
|
86
|
-
# @param
|
89
|
+
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
90
|
+
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
87
91
|
# @param team_name (String) (optional): The name of an App Store Connect team
|
88
|
-
def select_team(
|
92
|
+
def select_team(portal_team_id: nil, tunes_team_id: nil, team_name: nil)
|
89
93
|
return if client.nil?
|
90
|
-
client.select_team(
|
94
|
+
client.select_team(portal_team_id: portal_team_id, tunes_team_id: tunes_team_id, team_name: team_name)
|
91
95
|
end
|
92
96
|
end
|
93
97
|
end
|
@@ -18,13 +18,13 @@ module Spaceship
|
|
18
18
|
#
|
19
19
|
|
20
20
|
def get_apps(filter: {}, includes: nil, limit: nil, sort: nil)
|
21
|
-
params =
|
22
|
-
|
21
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
22
|
+
test_flight_request_client.get("apps", params)
|
23
23
|
end
|
24
24
|
|
25
25
|
def get_app(app_id: nil, includes: nil)
|
26
|
-
params =
|
27
|
-
|
26
|
+
params = test_flight_request_client.build_params(filter: nil, includes: includes, limit: nil, sort: nil)
|
27
|
+
test_flight_request_client.get("apps/#{app_id}", params)
|
28
28
|
end
|
29
29
|
|
30
30
|
#
|
@@ -32,8 +32,8 @@ module Spaceship
|
|
32
32
|
#
|
33
33
|
|
34
34
|
def get_beta_app_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
35
|
-
params =
|
36
|
-
|
35
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
36
|
+
test_flight_request_client.get("betaAppLocalizations", params)
|
37
37
|
end
|
38
38
|
|
39
39
|
def post_beta_app_localizations(app_id: nil, attributes: {})
|
@@ -52,7 +52,7 @@ module Spaceship
|
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
55
|
-
|
55
|
+
test_flight_request_client.post("betaAppLocalizations", body)
|
56
56
|
end
|
57
57
|
|
58
58
|
def patch_beta_app_localizations(localization_id: nil, attributes: {})
|
@@ -64,7 +64,7 @@ module Spaceship
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
-
|
67
|
+
test_flight_request_client.patch("betaAppLocalizations/#{localization_id}", body)
|
68
68
|
end
|
69
69
|
|
70
70
|
#
|
@@ -72,8 +72,8 @@ module Spaceship
|
|
72
72
|
#
|
73
73
|
|
74
74
|
def get_beta_app_review_detail(filter: {}, includes: nil, limit: nil, sort: nil)
|
75
|
-
params =
|
76
|
-
|
75
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
76
|
+
test_flight_request_client.get("betaAppReviewDetails", params)
|
77
77
|
end
|
78
78
|
|
79
79
|
def patch_beta_app_review_detail(app_id: nil, attributes: {})
|
@@ -85,7 +85,7 @@ module Spaceship
|
|
85
85
|
}
|
86
86
|
}
|
87
87
|
|
88
|
-
|
88
|
+
test_flight_request_client.patch("betaAppReviewDetails/#{app_id}", body)
|
89
89
|
end
|
90
90
|
|
91
91
|
#
|
@@ -93,8 +93,8 @@ module Spaceship
|
|
93
93
|
#
|
94
94
|
|
95
95
|
def get_beta_app_review_submissions(filter: {}, includes: nil, limit: nil, sort: nil, cursor: nil)
|
96
|
-
params =
|
97
|
-
|
96
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort, cursor: cursor)
|
97
|
+
test_flight_request_client.get("betaAppReviewSubmissions", params)
|
98
98
|
end
|
99
99
|
|
100
100
|
def post_beta_app_review_submissions(build_id: nil)
|
@@ -112,12 +112,12 @@ module Spaceship
|
|
112
112
|
}
|
113
113
|
}
|
114
114
|
|
115
|
-
|
115
|
+
test_flight_request_client.post("betaAppReviewSubmissions", body)
|
116
116
|
end
|
117
117
|
|
118
118
|
def delete_beta_app_review_submission(beta_app_review_submission_id: nil)
|
119
|
-
params =
|
120
|
-
|
119
|
+
params = test_flight_request_client.build_params(filter: nil, includes: nil, limit: nil, sort: nil, cursor: nil)
|
120
|
+
test_flight_request_client.delete("betaAppReviewSubmissions/#{beta_app_review_submission_id}", params)
|
121
121
|
end
|
122
122
|
|
123
123
|
#
|
@@ -125,8 +125,8 @@ module Spaceship
|
|
125
125
|
#
|
126
126
|
|
127
127
|
def get_beta_build_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
|
128
|
-
params =
|
129
|
-
|
128
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
129
|
+
test_flight_request_client.get("betaBuildLocalizations", params)
|
130
130
|
end
|
131
131
|
|
132
132
|
def post_beta_build_localizations(build_id: nil, attributes: {})
|
@@ -145,7 +145,7 @@ module Spaceship
|
|
145
145
|
}
|
146
146
|
}
|
147
147
|
|
148
|
-
|
148
|
+
test_flight_request_client.post("betaBuildLocalizations", body)
|
149
149
|
end
|
150
150
|
|
151
151
|
def patch_beta_build_localizations(localization_id: nil, feedbackEmail: nil, attributes: {})
|
@@ -157,7 +157,7 @@ module Spaceship
|
|
157
157
|
}
|
158
158
|
}
|
159
159
|
|
160
|
-
|
160
|
+
test_flight_request_client.patch("betaBuildLocalizations/#{localization_id}", body)
|
161
161
|
end
|
162
162
|
|
163
163
|
#
|
@@ -165,8 +165,8 @@ module Spaceship
|
|
165
165
|
#
|
166
166
|
|
167
167
|
def get_beta_build_metrics(filter: {}, includes: nil, limit: nil, sort: nil)
|
168
|
-
params =
|
169
|
-
|
168
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
169
|
+
test_flight_request_client.get("betaBuildMetrics", params)
|
170
170
|
end
|
171
171
|
|
172
172
|
#
|
@@ -174,8 +174,8 @@ module Spaceship
|
|
174
174
|
#
|
175
175
|
|
176
176
|
def get_beta_groups(filter: {}, includes: nil, limit: nil, sort: nil)
|
177
|
-
params =
|
178
|
-
|
177
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
178
|
+
test_flight_request_client.get("betaGroups", params)
|
179
179
|
end
|
180
180
|
|
181
181
|
def add_beta_groups_to_build(build_id: nil, beta_group_ids: [])
|
@@ -188,7 +188,7 @@ module Spaceship
|
|
188
188
|
end
|
189
189
|
}
|
190
190
|
|
191
|
-
|
191
|
+
test_flight_request_client.post("builds/#{build_id}/relationships/betaGroups", body)
|
192
192
|
end
|
193
193
|
|
194
194
|
def create_beta_group(app_id: nil, group_name: nil, public_link_enabled: false, public_link_limit: 10_000, public_link_limit_enabled: false)
|
@@ -211,7 +211,7 @@ module Spaceship
|
|
211
211
|
type: "betaGroups"
|
212
212
|
}
|
213
213
|
}
|
214
|
-
|
214
|
+
test_flight_request_client.post("betaGroups", body)
|
215
215
|
end
|
216
216
|
|
217
217
|
#
|
@@ -219,8 +219,8 @@ module Spaceship
|
|
219
219
|
#
|
220
220
|
|
221
221
|
def get_beta_testers(filter: {}, includes: nil, limit: nil, sort: nil)
|
222
|
-
params =
|
223
|
-
|
222
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
223
|
+
test_flight_request_client.get("betaTesters", params)
|
224
224
|
end
|
225
225
|
|
226
226
|
# beta_testers - [{email: "", firstName: "", lastName: ""}]
|
@@ -248,7 +248,7 @@ module Spaceship
|
|
248
248
|
}
|
249
249
|
}
|
250
250
|
|
251
|
-
|
251
|
+
test_flight_request_client.post("bulkBetaTesterAssignments", body)
|
252
252
|
end
|
253
253
|
|
254
254
|
def delete_beta_tester_from_apps(beta_tester_id: nil, app_ids: [])
|
@@ -261,7 +261,7 @@ module Spaceship
|
|
261
261
|
end
|
262
262
|
}
|
263
263
|
|
264
|
-
|
264
|
+
test_flight_request_client.delete("betaTesters/#{beta_tester_id}/relationships/apps", nil, body)
|
265
265
|
end
|
266
266
|
|
267
267
|
def delete_beta_tester_from_beta_groups(beta_tester_id: nil, beta_group_ids: [])
|
@@ -274,7 +274,7 @@ module Spaceship
|
|
274
274
|
end
|
275
275
|
}
|
276
276
|
|
277
|
-
|
277
|
+
test_flight_request_client.delete("betaTesters/#{beta_tester_id}/relationships/betaGroups", nil, body)
|
278
278
|
end
|
279
279
|
|
280
280
|
#
|
@@ -282,8 +282,8 @@ module Spaceship
|
|
282
282
|
#
|
283
283
|
|
284
284
|
def get_beta_tester_metrics(filter: {}, includes: nil, limit: nil, sort: nil)
|
285
|
-
params =
|
286
|
-
|
285
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
286
|
+
test_flight_request_client.get("betaTesterMetrics", params)
|
287
287
|
end
|
288
288
|
|
289
289
|
#
|
@@ -291,17 +291,17 @@ module Spaceship
|
|
291
291
|
#
|
292
292
|
|
293
293
|
def get_builds(filter: {}, includes: "buildBetaDetail,betaBuildMetrics", limit: 10, sort: "uploadedDate", cursor: nil)
|
294
|
-
params =
|
295
|
-
|
294
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort, cursor: cursor)
|
295
|
+
test_flight_request_client.get("builds", params)
|
296
296
|
end
|
297
297
|
|
298
298
|
def get_build(build_id: nil, app_store_version_id: nil, includes: nil)
|
299
299
|
if build_id
|
300
|
-
params =
|
301
|
-
return
|
300
|
+
params = test_flight_request_client.build_params(filter: nil, includes: includes, limit: nil, sort: nil, cursor: nil)
|
301
|
+
return test_flight_request_client.get("builds/#{build_id}", params)
|
302
302
|
elsif app_store_version_id
|
303
|
-
params =
|
304
|
-
return
|
303
|
+
params = test_flight_request_client.build_params(filter: nil, includes: includes, limit: nil, sort: nil, cursor: nil)
|
304
|
+
return test_flight_request_client.get("appStoreVersions/#{app_store_version_id}/build", params)
|
305
305
|
else
|
306
306
|
return nil
|
307
307
|
end
|
@@ -316,7 +316,7 @@ module Spaceship
|
|
316
316
|
}
|
317
317
|
}
|
318
318
|
|
319
|
-
|
319
|
+
test_flight_request_client.patch("builds/#{build_id}", body)
|
320
320
|
end
|
321
321
|
|
322
322
|
#
|
@@ -324,8 +324,8 @@ module Spaceship
|
|
324
324
|
#
|
325
325
|
|
326
326
|
def get_build_beta_details(filter: {}, includes: nil, limit: nil, sort: nil)
|
327
|
-
params =
|
328
|
-
|
327
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
328
|
+
test_flight_request_client.get("buildBetaDetails", params)
|
329
329
|
end
|
330
330
|
|
331
331
|
def patch_build_beta_details(build_beta_details_id: nil, attributes: {})
|
@@ -337,7 +337,7 @@ module Spaceship
|
|
337
337
|
}
|
338
338
|
}
|
339
339
|
|
340
|
-
|
340
|
+
test_flight_request_client.patch("buildBetaDetails/#{build_beta_details_id}", body)
|
341
341
|
end
|
342
342
|
|
343
343
|
#
|
@@ -345,8 +345,8 @@ module Spaceship
|
|
345
345
|
#
|
346
346
|
|
347
347
|
def get_build_deliveries(filter: {}, includes: nil, limit: nil, sort: nil)
|
348
|
-
params =
|
349
|
-
|
348
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
349
|
+
test_flight_request_client.get("buildDeliveries", params)
|
350
350
|
end
|
351
351
|
|
352
352
|
#
|
@@ -354,8 +354,8 @@ module Spaceship
|
|
354
354
|
#
|
355
355
|
|
356
356
|
def get_pre_release_versions(filter: {}, includes: nil, limit: nil, sort: nil)
|
357
|
-
params =
|
358
|
-
|
357
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
358
|
+
test_flight_request_client.get("preReleaseVersions", params)
|
359
359
|
end
|
360
360
|
|
361
361
|
#
|
@@ -363,14 +363,14 @@ module Spaceship
|
|
363
363
|
#
|
364
364
|
|
365
365
|
def get_beta_feedback(filter: {}, includes: nil, limit: nil, sort: nil)
|
366
|
-
params =
|
367
|
-
|
366
|
+
params = test_flight_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
|
367
|
+
test_flight_request_client.get("betaFeedbacks", params)
|
368
368
|
end
|
369
369
|
|
370
370
|
def delete_beta_feedback(feedback_id: nil)
|
371
371
|
raise "Feedback id is nil" if feedback_id.nil?
|
372
372
|
|
373
|
-
|
373
|
+
test_flight_request_client.delete("betaFeedbacks/#{feedback_id}")
|
374
374
|
end
|
375
375
|
end
|
376
376
|
end
|