fastlane 2.157.1 → 2.159.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 +80 -80
- data/deliver/lib/deliver/runner.rb +4 -2
- data/deliver/lib/deliver/upload_metadata.rb +5 -1
- data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -8
- data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +89 -68
- data/fastlane/lib/fastlane/actions/set_changelog.rb +2 -1
- data/fastlane/lib/fastlane/helper/git_helper.rb +2 -0
- data/fastlane/lib/fastlane/swift_fastlane_api_generator.rb +6 -4
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +1 -1
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/Actions.swift +2 -1
- data/fastlane/swift/Appfile.swift +2 -4
- data/fastlane/swift/ArgumentProcessor.swift +2 -6
- data/fastlane/swift/ControlCommand.swift +2 -5
- data/fastlane/swift/Deliverfile.swift +5 -2
- data/fastlane/swift/DeliverfileProtocol.swift +6 -3
- data/fastlane/swift/Fastfile.swift +5 -1
- data/fastlane/swift/Fastlane.swift +2227 -2218
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj +5 -5
- data/fastlane/swift/Gymfile.swift +5 -2
- data/fastlane/swift/GymfileProtocol.swift +6 -3
- data/fastlane/swift/LaneFileProtocol.swift +36 -19
- data/fastlane/swift/MainProcess.swift +77 -0
- data/fastlane/swift/Matchfile.swift +5 -2
- data/fastlane/swift/MatchfileProtocol.swift +6 -3
- data/fastlane/swift/Plugins.swift +2 -1
- data/fastlane/swift/Precheckfile.swift +5 -2
- data/fastlane/swift/PrecheckfileProtocol.swift +10 -3
- data/fastlane/swift/RubyCommand.swift +2 -6
- data/fastlane/swift/RubyCommandable.swift +2 -6
- data/fastlane/swift/Runner.swift +5 -9
- data/fastlane/swift/RunnerArgument.swift +2 -6
- data/fastlane/swift/Scanfile.swift +5 -2
- data/fastlane/swift/ScanfileProtocol.swift +6 -3
- data/fastlane/swift/Screengrabfile.swift +5 -2
- data/fastlane/swift/ScreengrabfileProtocol.swift +6 -3
- data/fastlane/swift/Snapshotfile.swift +5 -2
- data/fastlane/swift/SnapshotfileProtocol.swift +6 -3
- data/fastlane/swift/SocketClient.swift +3 -7
- data/fastlane/swift/SocketClientDelegateProtocol.swift +2 -6
- data/fastlane/swift/SocketResponse.swift +2 -6
- data/fastlane/swift/formatting/Brewfile.lock.json +18 -10
- data/fastlane/swift/main.swift +4 -8
- data/fastlane/swift/upgrade_manifest.json +1 -1
- data/match/lib/match/importer.rb +5 -2
- data/match/lib/match/spaceship_ensure.rb +5 -5
- data/pilot/lib/pilot/build_manager.rb +0 -3
- data/pilot/lib/pilot/manager.rb +1 -2
- 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 +2 -1
- data/sigh/lib/assets/resign.sh +9 -6
- data/sigh/lib/sigh/runner.rb +2 -1
- data/snapshot/lib/assets/SnapshotHelper.swift +17 -2
- data/spaceship/lib/spaceship/client.rb +1 -0
- data/spaceship/lib/spaceship/connect_api.rb +1 -0
- data/spaceship/lib/spaceship/connect_api/client.rb +37 -10
- data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
- data/spaceship/lib/spaceship/connect_api/models/.app.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.app_store_version.rb.swp +0 -0
- data/spaceship/lib/spaceship/connect_api/models/.app_store_version_submission.rb.swp +0 -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 +3 -2
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +50 -50
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +20 -0
- metadata +23 -18
@@ -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
|
+
# 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
|
12
14
|
Spaceship::ConnectAPI.login(Produce.config[:username], nil, use_portal: false, use_tunes: true)
|
13
|
-
Spaceship::ConnectAPI.client.select_team
|
14
15
|
|
15
16
|
create_new_app
|
16
17
|
end
|
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
23
|
Spaceship::ConnectAPI.login(Sigh.config[:username], nil, use_portal: true, use_tunes: false)
|
22
|
-
Spaceship::ConnectAPI.select_team
|
23
24
|
UI.message("Successfully logged in")
|
24
25
|
|
25
26
|
profiles = [] if Sigh.config[:skip_fetch_profiles]
|
@@ -165,6 +165,8 @@ open class Snapshot: NSObject {
|
|
165
165
|
}
|
166
166
|
|
167
167
|
let screenshot = XCUIScreen.main.screenshot()
|
168
|
+
let image = XCUIDevice.shared.orientation.isLandscape ? fixLandscapeOrientation(image: screenshot.image) : screenshot.image
|
169
|
+
|
168
170
|
guard var simulator = ProcessInfo().environment["SIMULATOR_DEVICE_NAME"], let screenshotsDir = screenshotsDirectory else { return }
|
169
171
|
|
170
172
|
do {
|
@@ -174,7 +176,7 @@ open class Snapshot: NSObject {
|
|
174
176
|
simulator = regex.stringByReplacingMatches(in: simulator, range: range, withTemplate: "")
|
175
177
|
|
176
178
|
let path = screenshotsDir.appendingPathComponent("\(simulator)-\(name).png")
|
177
|
-
try
|
179
|
+
try image.pngData()?.write(to: path, options: .atomic)
|
178
180
|
} catch let error {
|
179
181
|
NSLog("Problem writing screenshot: \(name) to \(screenshotsDir)/\(simulator)-\(name).png")
|
180
182
|
NSLog(error.localizedDescription)
|
@@ -182,6 +184,19 @@ open class Snapshot: NSObject {
|
|
182
184
|
#endif
|
183
185
|
}
|
184
186
|
|
187
|
+
class func fixLandscapeOrientation(image: UIImage) -> UIImage {
|
188
|
+
if #available(iOS 10.0, *) {
|
189
|
+
let format = UIGraphicsImageRendererFormat()
|
190
|
+
format.scale = image.scale
|
191
|
+
let renderer = UIGraphicsImageRenderer(size: image.size, format: format)
|
192
|
+
return renderer.image { context in
|
193
|
+
image.draw(in: CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height))
|
194
|
+
}
|
195
|
+
} else {
|
196
|
+
return image
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
185
200
|
class func waitForLoadingIndicatorToDisappear(within timeout: TimeInterval) {
|
186
201
|
#if os(tvOS)
|
187
202
|
return
|
@@ -279,4 +294,4 @@ private extension CGFloat {
|
|
279
294
|
|
280
295
|
// Please don't remove the lines below
|
281
296
|
// They are used to detect outdated configuration files
|
282
|
-
// SnapshotHelperVersion [1.
|
297
|
+
// SnapshotHelperVersion [1.24]
|
@@ -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'
|
@@ -43,20 +43,27 @@ module Spaceship
|
|
43
43
|
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
44
44
|
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
45
45
|
# @param team_name (String) (optional): The team name
|
46
|
+
# @param skip_select_team (Boolean) (optional): Whether to skip automatic selection or prompt for team
|
46
47
|
#
|
47
48
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
48
49
|
#
|
49
50
|
# @return (Spaceship::ConnectAPI::Client) The client the login method was called for
|
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 =
|
52
|
-
tunes_client =
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
51
|
+
def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil, skip_select_team: false)
|
52
|
+
portal_client = Spaceship::Portal.login(user, password) if use_portal
|
53
|
+
tunes_client = Spaceship::Tunes.login(user, password) if use_tunes
|
54
|
+
|
55
|
+
unless skip_select_team
|
56
|
+
# Check if environment variables are set for Spaceship::Portal or Spaceship::Tunes to select team
|
57
|
+
portal_team_id ||= ENV['FASTLANE_TEAM_ID']
|
58
|
+
portal_team_name = team_name || ENV['FASTLANE_TEAM_NAME']
|
59
|
+
tunes_team_id ||= ENV['FASTLANE_ITC_TEAM_ID']
|
60
|
+
tunes_team_name = team_name || ENV['FASTLANE_ITC_TEAM_NAME']
|
61
|
+
|
62
|
+
# The clients will prompt for a team selection if:
|
63
|
+
# 1. client exists
|
64
|
+
# 2. team_id and team_name are nil and user belongs to multiple teams
|
65
|
+
portal_client.select_team(team_id: portal_team_id, team_name: portal_team_name) if portal_client
|
66
|
+
tunes_client.select_team(team_id: tunes_team_id, team_name: tunes_team_name) if tunes_client
|
60
67
|
end
|
61
68
|
|
62
69
|
return ConnectAPI::Client.new(tunes_client: tunes_client, portal_client: portal_client)
|
@@ -89,6 +96,26 @@ module Spaceship
|
|
89
96
|
)
|
90
97
|
end
|
91
98
|
|
99
|
+
def portal_team_id
|
100
|
+
return nil if @portal_client.nil?
|
101
|
+
return @portal_client.team_id
|
102
|
+
end
|
103
|
+
|
104
|
+
def tunes_team_id
|
105
|
+
return nil if @tunes_client.nil?
|
106
|
+
return @tunes_client.team_id
|
107
|
+
end
|
108
|
+
|
109
|
+
def portal_teams
|
110
|
+
return nil if @portal_client.nil?
|
111
|
+
return @portal_client.teams
|
112
|
+
end
|
113
|
+
|
114
|
+
def tunes_teams
|
115
|
+
return nil if @tunes_client.nil?
|
116
|
+
return @tunes_client.teams
|
117
|
+
end
|
118
|
+
|
92
119
|
def in_house?
|
93
120
|
if token
|
94
121
|
if token.in_house.nil?
|
Binary file
|
Binary file
|
@@ -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
|
@@ -73,12 +73,13 @@ module Spaceship
|
|
73
73
|
# @param portal_team_id (String) (optional): The Spaceship::Portal team id
|
74
74
|
# @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
|
75
75
|
# @param team_name (String) (optional): The team name
|
76
|
+
# @param skip_select_team (Boolean) (optional): Whether to skip automatic selection or prompt for team
|
76
77
|
#
|
77
78
|
# @raise InvalidUserCredentialsError: raised if authentication failed
|
78
79
|
#
|
79
80
|
# @return (Spaceship::ConnectAPI::Client) The client the login method was called for
|
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)
|
81
|
+
def login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil, skip_select_team: false)
|
82
|
+
@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, skip_select_team: skip_select_team)
|
82
83
|
end
|
83
84
|
|
84
85
|
# Open up the team selection for the user (if necessary).
|
@@ -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
|