fastlane-plugin-sapfire 1.2.0 → 1.2.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04c4cbeb06c2856f862f7d4410efeaf27cb92a9e0b7291280199be31046573c
|
4
|
+
data.tar.gz: e19d2776f46af1798b2a6ce9d9c512ae0eae5937fac8128876538d43df162095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7db36a7409104f795a328a2b0706e14e3a3f7ddf732d5f397ad57f6094bd894007a60d65897f5076d7add53a0abd8e0707fd1bc36c8cc0d80592861856df2b4
|
7
|
+
data.tar.gz: 78e224d53850151f10099fb430f276ed2dfcc1fb92fa6b5dd47f0217c3880c235f65de35722bae2d6e1438755c123c091a5ce5f8032af0cc3f4b79cd721b51a7
|
@@ -11,6 +11,9 @@ module Fastlane
|
|
11
11
|
@vsapi_host = ""
|
12
12
|
@vsapi_endpoint = ""
|
13
13
|
|
14
|
+
VS_API_FW_LINK = "2264307".freeze
|
15
|
+
DEV_CENTER_FW_LINK = "2263650".freeze
|
16
|
+
VS_CLIENT_ID = "04f0c124-f2bc-4f59-8241-bf6df9866bbd".freeze
|
14
17
|
XML_NAME = "Package.StoreAssociation.xml".freeze
|
15
18
|
|
16
19
|
def self.run(params)
|
@@ -19,8 +22,9 @@ module Fastlane
|
|
19
22
|
begin
|
20
23
|
UI.message("Creating #{XML_NAME}...")
|
21
24
|
|
22
|
-
|
23
|
-
|
25
|
+
dev_center_url = acquire_dev_center_location
|
26
|
+
acquire_vs_api_location
|
27
|
+
acquire_authorization_token(dev_center_url)
|
24
28
|
ms_developer_info = developer_info
|
25
29
|
ms_app_info = app_info(params[:app_id])
|
26
30
|
create_xml(params[:manifest], ms_developer_info, ms_app_info)
|
@@ -161,16 +165,14 @@ module Fastlane
|
|
161
165
|
end
|
162
166
|
end
|
163
167
|
|
164
|
-
def self.acquire_authorization_token
|
168
|
+
def self.acquire_authorization_token(resource)
|
165
169
|
UI.message("Acquiring authorization token ...")
|
166
170
|
|
167
171
|
ms_credentials = Helper.ms_credentials
|
168
172
|
body = {
|
169
|
-
client_id:
|
170
|
-
client_secret: ms_credentials.client_secret,
|
171
|
-
client_info: 1,
|
173
|
+
client_id: VS_CLIENT_ID,
|
172
174
|
grant_type: "password",
|
173
|
-
scope: "
|
175
|
+
scope: "#{resource}/.default",
|
174
176
|
username: ms_credentials.username,
|
175
177
|
password: ms_credentials.password
|
176
178
|
}
|
@@ -202,9 +204,25 @@ module Fastlane
|
|
202
204
|
end
|
203
205
|
end
|
204
206
|
|
205
|
-
def self.
|
207
|
+
def self.acquire_dev_center_location
|
208
|
+
location = acquire_fw_url(DEV_CENTER_FW_LINK)
|
209
|
+
UI.message("Dev Center location: #{location}")
|
210
|
+
|
211
|
+
location
|
212
|
+
end
|
213
|
+
|
214
|
+
def self.acquire_vs_api_location
|
215
|
+
location = acquire_fw_url(VS_API_FW_LINK)
|
216
|
+
uri = URI(location)
|
217
|
+
@vsapi_host = "#{uri.scheme}://#{uri.host}"
|
218
|
+
@vsapi_endpoint = uri.path
|
219
|
+
|
220
|
+
UI.message("VS API location: #{location}")
|
221
|
+
end
|
222
|
+
|
223
|
+
def self.acquire_fw_url(link_id)
|
206
224
|
query = {
|
207
|
-
LinkId:
|
225
|
+
LinkId: link_id
|
208
226
|
}
|
209
227
|
connection = Faraday.new("https://go.microsoft.com")
|
210
228
|
|
@@ -214,14 +232,7 @@ module Fastlane
|
|
214
232
|
if response.status == 302
|
215
233
|
raise "'Location' header isn't presented" unless response.headers.include?("Location")
|
216
234
|
|
217
|
-
|
218
|
-
uri = URI(location)
|
219
|
-
@vsapi_host = "#{uri.scheme}://#{uri.host}"
|
220
|
-
@vsapi_endpoint = uri.path
|
221
|
-
|
222
|
-
UI.message("VS API endpoint: #{location}")
|
223
|
-
|
224
|
-
return
|
235
|
+
return response.headers["Location"]
|
225
236
|
end
|
226
237
|
|
227
238
|
UI.user_error!("Request returned the error: #{response.status}")
|
@@ -23,9 +23,10 @@ module Fastlane
|
|
23
23
|
|
24
24
|
UI.message("Creating submission for app #{app_id} ...")
|
25
25
|
pending_submission = Helper::MsDevCenterHelper.non_published_submission(app_id, auth_token, timeout)
|
26
|
-
submission_id = pending_submission["id"]
|
27
26
|
|
28
27
|
unless pending_submission.nil?
|
28
|
+
submission_id = pending_submission["id"]
|
29
|
+
|
29
30
|
if params.values.include?(:remove_pending_submission) &&
|
30
31
|
[true].include?(params[:remove_pending_submission])
|
31
32
|
UI.message("Pending submission #{submission_id} were found and scheduled for deletion due to 'remove_pending_submission' argument set to 'true'")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-sapfire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CheeryLee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '0'
|
178
178
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
179
|
+
rubygems_version: 3.3.26
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: A bunch of fastlane actions to work with MSBuild, NuGet and Microsoft Store
|