fastlane-plugin-upload_to_server 0.1.4 → 0.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1809a71584d013a3eb54ae034f12455d1115f0ee
|
4
|
+
data.tar.gz: d20b92b02aa1849a748a9d67ce0752c603ac04d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8e7e81575746489bbd15fa168f23fd7f6ec9c176416ad502f424a64fb463d61355efbb89cf82cc024426aad9654f998f1da077058b760bdfe4613c94d4c8b1
|
7
|
+
data.tar.gz: d09b78b0495cd4780f1bfeca4d17d649da6388a7963af7c5757e38820d8b2efdcb3410aa00c4c69076520afdfe7300e208a42575561ea8c79569b939e7012781
|
data/README.md
CHANGED
@@ -26,37 +26,24 @@ module Fastlane
|
|
26
26
|
UI.user_error!("No IPA or APK or a file path given, pass using `ipa: 'ipa path'` or `apk: 'apk path' or file:`") if ipa_file.to_s.length == 0 && apk_file.to_s.length == 0 && custom_file.to_s.length == 0
|
27
27
|
UI.user_error!("Please only give IPA path or APK path (not both)") if ipa_file.to_s.length > 0 && apk_file.to_s.length > 0
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
upload_custom_file(params, apk_file) if apk_file.to_s.length > 0
|
30
|
+
upload_custom_file(params, ipa_file) if ipa_file.to_s.length > 0
|
31
31
|
upload_custom_file(params, custom_file) if custom_file.to_s.length > 0
|
32
32
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def self.upload_custom_file(params, custom_file)
|
36
36
|
multipart_payload = params[:multipartPayload]
|
37
|
-
|
38
|
-
multipart_payload[:multipart] = true
|
39
|
-
multipart_payload[:file] = File.new(params[:file], 'rb')
|
40
|
-
|
41
|
-
upload_file(params, multipart_payload)
|
42
|
-
end
|
43
|
-
|
44
|
-
def self.upload_apk(params, apk_file)
|
45
|
-
multipart_payload = params[:multipartPayload]
|
46
|
-
|
47
37
|
multipart_payload[:multipart] = true
|
48
|
-
multipart_payload[:
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
multipart_payload[:file] = File.new(params[:ipa], 'rb')
|
58
|
-
|
59
|
-
upload_file(params, multipart_payload)
|
38
|
+
if multipart_payload[:fileFormFieldName]
|
39
|
+
key = multipart_payload[:fileFormFieldName]
|
40
|
+
multipart_payload["#{key}"] = File.new(custom_file, 'rb')
|
41
|
+
else
|
42
|
+
multipart_payload[:file] = File.new(custom_file, 'rb')
|
43
|
+
end
|
44
|
+
|
45
|
+
UI.message multipart_payload
|
46
|
+
upload_file(params, multipart_payload)
|
60
47
|
end
|
61
48
|
|
62
49
|
def self.upload_file(params, multipart_payload)
|
@@ -105,7 +92,7 @@ module Fastlane
|
|
105
92
|
FastlaneCore::ConfigItem.new(key: :file,
|
106
93
|
env_name: "",
|
107
94
|
description: "file to be uploaded to the server",
|
108
|
-
optional: true,
|
95
|
+
optional: true),
|
109
96
|
FastlaneCore::ConfigItem.new(key: :multipartPayload,
|
110
97
|
env_name: "",
|
111
98
|
description: "payload for the multipart request ",
|