fastlane-plugin-sxc_aliyun_oss 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5e2998270862d3299a6673ffcd60befcd1a68c21ab11cd8ab5277033c65481c
|
4
|
+
data.tar.gz: a4469f45dacefe690c4e089924a776904014f37cd898cf09496243808ddbd359
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d18410174884a021e5de5dbe2277d15f51db7d7bf18d9329531cfcb53b7a31b8bcacbdd0ccb22a38620755579c65dfe9675e3f54f3ae691aba5921ff41b3f5e
|
7
|
+
data.tar.gz: 1894253b6fd2c3cb2c22de53ff14aab09eb9c656766a2fbb64e0e6e00994b1520228b203324f1dbb6688208d9bcf2f782c9c0cee41120b8cef1ff6ad1c1d2e36
|
@@ -11,11 +11,20 @@ module Fastlane
|
|
11
11
|
bucket_name = params[:bucket]
|
12
12
|
access_key_id = params[:access_key_id]
|
13
13
|
access_key_secret = params[:access_key_secret]
|
14
|
-
file_path = params[:file_path]
|
15
14
|
object_key = params[:object_key]
|
16
15
|
|
17
16
|
UI.message "endpoint: #{endpoint} bucket_name: #{bucket_name}"
|
18
17
|
|
18
|
+
build_file = [
|
19
|
+
params[:ipa],
|
20
|
+
params[:apk]
|
21
|
+
].detect { |e| !e.to_s.empty? }
|
22
|
+
|
23
|
+
if build_file.nil?
|
24
|
+
UI.user_error!("You have to provide a build file")
|
25
|
+
end
|
26
|
+
|
27
|
+
UI.message "build_file: #{build_file}"
|
19
28
|
# create aliyun oss client
|
20
29
|
client = Aliyun::OSS::Client.new(
|
21
30
|
endpoint: endpoint,
|
@@ -27,7 +36,7 @@ module Fastlane
|
|
27
36
|
bucket = client.get_bucket(bucket_name)
|
28
37
|
#
|
29
38
|
UI.message "🚀uploading package..."
|
30
|
-
bucket.put_object(object_key, :file =>
|
39
|
+
bucket.put_object(object_key, :file => build_file)
|
31
40
|
UI.message "✅uploading package success"
|
32
41
|
|
33
42
|
end
|
@@ -71,11 +80,30 @@ module Fastlane
|
|
71
80
|
description: "bucket is required!",
|
72
81
|
optional: false,
|
73
82
|
type: String),
|
74
|
-
FastlaneCore::ConfigItem.new(key: :
|
75
|
-
env_name: "
|
76
|
-
description: "
|
77
|
-
|
78
|
-
|
83
|
+
FastlaneCore::ConfigItem.new(key: :apk,
|
84
|
+
env_name: "ALIOSS_APK",
|
85
|
+
description: "apk path",
|
86
|
+
default_value: Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH],
|
87
|
+
optional: true,
|
88
|
+
verify_block: proc do |value|
|
89
|
+
UI.user_error!("Couldn't find apk file at path '#{value}'") unless File.exist?(value)
|
90
|
+
end,
|
91
|
+
conflicting_options: [:ipa],
|
92
|
+
conflict_block: proc do |value|
|
93
|
+
UI.user_error!("You can't use 'apk' and '#{value.key}' options in one run")
|
94
|
+
end),
|
95
|
+
FastlaneCore::ConfigItem.new(key: :ipa,
|
96
|
+
env_name: "ALIOSS_IPA",
|
97
|
+
description: "Path to your IPA file. Optional if you use the _gym_ or _xcodebuild_ action. For Mac zip the .app. For Android provide path to .apk file",
|
98
|
+
default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
99
|
+
optional: true,
|
100
|
+
verify_block: proc do |value|
|
101
|
+
UI.user_error!("Couldn't find ipa file at path '#{value}'") unless File.exist?(value)
|
102
|
+
end,
|
103
|
+
conflicting_options: [:apk],
|
104
|
+
conflict_block: proc do |value|
|
105
|
+
UI.user_error!("You can't use 'ipa' and '#{value.key}' options in one run")
|
106
|
+
end),
|
79
107
|
FastlaneCore::ConfigItem.new(key: :object_key,
|
80
108
|
env_name: "ALIOSS_OBJECT_KEY",
|
81
109
|
description: "object_key is reqiured",
|