fastlane-plugin-alioss 0.2.0 → 0.2.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: fb01faceabdadb101ad5cd03b2d8ac7a48c6aacd04660c2a6ceee83b2e8b3663
|
4
|
+
data.tar.gz: 9ae54709fc32c44896a9f8352cafcbb2451e52836c5c99e29665a464d8c3373f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d57328b2bc249a666d442e34350d222972c309f6f020d384c8aa68ada4126784a3f0cc1d06af512e663fe037b04dd8ce6626d0a33fa197e4315d4ebf8804b4
|
7
|
+
data.tar.gz: 3b68e3905dcdb340eeb4bca2634bf7c65aeab5feaf1cc32a18a846e2487a10a0836db7bab10e1b6181c06d3153abd2be69e5dd19d66e92ad801f9e5db7cffe9d
|
@@ -6,6 +6,14 @@ require 'json'
|
|
6
6
|
|
7
7
|
module Fastlane
|
8
8
|
module Actions
|
9
|
+
module SharedValues
|
10
|
+
BUILD_NUMBER = :BUILD_NUMBER
|
11
|
+
VERSION_NUMBER = :VERSION_NUMBER
|
12
|
+
PUBLISH_TIMESTAMP = :PUBLISH_TIMESTAMP
|
13
|
+
FILE_SIZE = :FILE_SIZE
|
14
|
+
DOWNLOAD_URL = :DOWNLOAD_URL
|
15
|
+
end
|
16
|
+
|
9
17
|
class AliossAction < Action
|
10
18
|
def self.run(params)
|
11
19
|
UI.message("The alioss plugin is working!")
|
@@ -185,6 +193,12 @@ module Fastlane
|
|
185
193
|
"build" => build_number,
|
186
194
|
"time" => timestamp.to_i
|
187
195
|
}
|
196
|
+
# Store the build_number, version_number, time, size
|
197
|
+
Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
|
198
|
+
Actions.lane_context[SharedValues::VERSION_NUMBER] = version_number
|
199
|
+
Actions.lane_context[SharedValues::PUBLISH_TIMESTAMP] = timestamp.to_i
|
200
|
+
Actions.lane_context[SharedValues::FILE_SIZE] = file_size
|
201
|
+
Actions.lane_context[SharedValues::DOWNLOAD_URL] = "#{download_domain}#{path_for_app_name}/index.html"
|
188
202
|
|
189
203
|
# 根据不同的平台,将bucket_path记录到json中
|
190
204
|
case File.extname(filename)
|
@@ -192,7 +206,6 @@ module Fastlane
|
|
192
206
|
UI.message "配置 manifest.plist ..."
|
193
207
|
app_name = GetIpaInfoPlistValueAction.run(ipa: build_file, key: 'CFBundleDisplayName')
|
194
208
|
app_identifier = GetIpaInfoPlistValueAction.run(ipa: build_file, key: 'CFBundleIdentifier')
|
195
|
-
download_url = download_url
|
196
209
|
UI.message "app_name: #{app_name}"
|
197
210
|
UI.message "app_identifier: #{app_identifier}"
|
198
211
|
UI.message "version_number: #{version_number}"
|
@@ -259,6 +272,16 @@ module Fastlane
|
|
259
272
|
["woodwu"]
|
260
273
|
end
|
261
274
|
|
275
|
+
def self.output
|
276
|
+
[
|
277
|
+
['BUILD_NUMBER', 'Update the new build number(version code) of your iOS/Android project'],
|
278
|
+
['VERSION_NUMBER', 'Update the new version number(version name) of your iOS/Android project'],
|
279
|
+
['PUBLISH_TIMESTAMP', 'The timestamp of auto-build'],
|
280
|
+
['FILE_SIZE', 'The size of your ipa/apk file'],
|
281
|
+
['DOWNLOAD_URL', 'The website url that you can download it']
|
282
|
+
]
|
283
|
+
end
|
284
|
+
|
262
285
|
def self.return_value
|
263
286
|
# If your method provides a return value, you can describe here what it does
|
264
287
|
end
|
@@ -352,6 +375,23 @@ module Fastlane
|
|
352
375
|
true
|
353
376
|
end
|
354
377
|
|
378
|
+
def self.example_code
|
379
|
+
[
|
380
|
+
# 上传App到阿里云oss服务器
|
381
|
+
'alioss(
|
382
|
+
endpoint: "oss-cn-shenzhen.aliyuncs.com",
|
383
|
+
access_key_id: "xxxxx",
|
384
|
+
access_key_secret: "xxxxx",
|
385
|
+
bucket_name: "cn-app-test",
|
386
|
+
app_name: "app/appname",
|
387
|
+
download_domain: "https://dl.yourdomain.com/",
|
388
|
+
update_description: "update description",
|
389
|
+
ipa: "valid ipa path", # iOS project required
|
390
|
+
apk: "valid apk path" # Android project required
|
391
|
+
)'
|
392
|
+
]
|
393
|
+
end
|
394
|
+
|
355
395
|
def self.create_manifest_file(params)
|
356
396
|
# create manifest.plist file
|
357
397
|
manifest_file = File.new("manifest.plist", "w")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-alioss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- woodwu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|