fastlane-plugin-rustore_developer 0.2.12 → 0.3.1
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/lib/fastlane/plugin/rustore_developer/actions/rustore_developer_auth_action.rb +4 -4
- data/lib/fastlane/plugin/rustore_developer/actions/rustore_developer_upload_action.rb +4 -3
- data/lib/fastlane/plugin/rustore_developer/helper/rustore_developer_helper.rb +5 -5
- data/lib/fastlane/plugin/rustore_developer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c395b2d1c3bc9975ac41c1c3af329160363d0cc14da5b134d76bc81c1323685
|
4
|
+
data.tar.gz: afeee1b001b6819b0c0bc84e6bca475ee0b2cac2c5c80f8e2d523981a523477e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f31b22723ed762ee134f45e2c340ad4d66a21ae331705f5c0dac9cde6d585e30815029d16d40e78fbc90b0799491b39260ad7ecac9ada41f2b9a6d2fba753738
|
7
|
+
data.tar.gz: ce59893ce3d290f2d7e5d52497bc7a7ce6e0b876647ded311dcc7b2b7d5e8da53795dd7a569a560357ca2f3a4fcdf174f499e48c49005d5a666295e70a353a01
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
class RustoreDeveloperAuthAction < Action
|
10
10
|
|
11
11
|
def self.run(params)
|
12
|
-
token = Helper::RustoreDeveloperHelper.getAccessToken(params[:
|
12
|
+
token = Helper::RustoreDeveloperHelper.getAccessToken(params[:key_id], params[:key_path])
|
13
13
|
Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_ACCESS_TOKEN] = token
|
14
14
|
return token
|
15
15
|
end
|
@@ -33,9 +33,9 @@ module Fastlane
|
|
33
33
|
|
34
34
|
def self.available_options
|
35
35
|
[
|
36
|
-
FastlaneCore::ConfigItem.new(key: :
|
37
|
-
env_name: "
|
38
|
-
description: "
|
36
|
+
FastlaneCore::ConfigItem.new(key: :key_id,
|
37
|
+
env_name: "RUSTORE_KEY_ID",
|
38
|
+
description: "Key ID",
|
39
39
|
optional: false,
|
40
40
|
type: String),
|
41
41
|
FastlaneCore::ConfigItem.new(key: :key_path,
|
@@ -6,11 +6,11 @@ module Fastlane
|
|
6
6
|
class RustoreDeveloperUploadAction < Action
|
7
7
|
|
8
8
|
def self.run(params)
|
9
|
-
return Helper::RustoreDeveloperHelper.uploadAPK(params[:token], params[:package], params[:version], params[:
|
9
|
+
return Helper::RustoreDeveloperHelper.uploadAPK(params[:token], params[:package], params[:version], params[:apk_path])
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.description
|
13
|
-
"RUSTORE: Upload an APK package"
|
13
|
+
"RUSTORE: Upload an APK package for version"
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.authors
|
@@ -47,7 +47,8 @@ module Fastlane
|
|
47
47
|
optional: true,
|
48
48
|
type: String,
|
49
49
|
default_value: Actions.lane_context[SharedValues::RUSTORE_DEVELOPER_DRAFT_VERSION]),
|
50
|
-
FastlaneCore::ConfigItem.new(key: :
|
50
|
+
FastlaneCore::ConfigItem.new(key: :apk_path,
|
51
|
+
env_name: "RUSTORE_APK_PATH",
|
51
52
|
description: "File path of APK artifact",
|
52
53
|
optional: false ,
|
53
54
|
type: String)
|
@@ -14,24 +14,24 @@ module Fastlane
|
|
14
14
|
# return '2023-08-23T09:00:32.939+03:00'
|
15
15
|
end
|
16
16
|
|
17
|
-
def self.getSignatureEncoded(
|
17
|
+
def self.getSignatureEncoded(key_id, timestamp, key_path)
|
18
18
|
private_key = OpenSSL::PKey.read(File.read(key_path))
|
19
|
-
data =
|
19
|
+
data = key_id + timestamp
|
20
20
|
signature = private_key.sign("SHA512", data)
|
21
21
|
encoded = Base64.strict_encode64(signature)
|
22
22
|
return encoded
|
23
23
|
end
|
24
24
|
|
25
|
-
def self.getAccessToken(
|
25
|
+
def self.getAccessToken(key_id, key_path)
|
26
26
|
UI.important("Getting access token ...")
|
27
27
|
timestamp = getTimestamp()
|
28
|
-
sign = getSignatureEncoded(
|
28
|
+
sign = getSignatureEncoded(key_id, timestamp, key_path)
|
29
29
|
uri = URI(BASE_URL + '/public/auth/')
|
30
30
|
http = Net::HTTP.new(uri.host, uri.port)
|
31
31
|
http.use_ssl = true
|
32
32
|
req = Net::HTTP::Post.new(uri.path)
|
33
33
|
req["Content-Type"] = "application/json"
|
34
|
-
data = {'
|
34
|
+
data = {'keyId': key_id, 'timestamp': timestamp, 'signature': sign}
|
35
35
|
req.body = data.to_json
|
36
36
|
res = http.request(req)
|
37
37
|
result_json = JSON.parse(res.body)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-rustore_developer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RimiX2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
|
-
rubygems_version: 3.
|
190
|
+
rubygems_version: 3.4.19
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: RUSTORE beta API integration plugin
|