fastlane-plugin-alioss 0.1.2 → 0.1.3

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: 981fe34e7c62cfb03bd85a920e1ae094474f3f222f2d11b072574c87606fbaad
4
- data.tar.gz: 517a60e29e26ee0a9a88d3c60f3d008fc91ab71169c1838562b0e933f0b8256d
3
+ metadata.gz: 261fcb55a1dccb4f42cc77382b70bab1a48332fa847d16bd37f4dda4914ec6b3
4
+ data.tar.gz: 365601c71eea52452f546d72898b9664121e86af0328dbf41bdfd2883c0ffad6
5
5
  SHA512:
6
- metadata.gz: 55774636d73d5b0db4ae66a3c8e92edf26e6696b878c892650748d33c8aea6733c39635b3cabba496cde32c638fbd3eb45696c57ca379a2399410ba7f485e2f9
7
- data.tar.gz: 29e9041568666684a4744ec000c178015019fb3bf2ff56adb6000baab9d0c690a715cc1946611b76632a742eac524699368ffb59c61a074c5431acaa3fcb3995
6
+ metadata.gz: c4ad8c3e99eddc89300e439c581064946cd3ff1eaa7e1d0e104b7640e69319ecdd5149f661073c22040bb669c03a52154b51338f0b0e871192e1eb8e311ceaf4
7
+ data.tar.gz: 9bdcb756f8bde9a059f48fcf82c646b4b0ee4f531794265702dc0d166bc14484ce3308972001748e3af0c2b3b15140b476badf2c4c6ec5065339e4e5ed03cb2e
@@ -95,10 +95,21 @@ module Fastlane
95
95
  bucket_path = "#{path_for_app_name}/iOS"
96
96
  when ".apk"
97
97
  bucket_path = "#{path_for_app_name}/Android"
98
- build_number = Actions.lane_context[SharedValues::ANDROID_VERSION_CODE]
99
- version_number = Actions.lane_context[SharedValues::ANDROID_VERSION_NAME]
100
- if build_number.nil || version_number.nil?
101
- UI.important "ANDROID_VERSION_CODE & ANDROID_VERSION_NAME is nil,请设置 Actions.lane_context[SharedValues::ANDROID_VERSION_NAME] = version_name,推荐在fastlane中配置fastlane-plugin-versioning_android。"
98
+ # versionName、versionCode先从output.json文件里取
99
+ apk_output_json_path = File.join(File.dirname(build_file), "output.json")
100
+ if File.readable?(apk_output_json_path)
101
+ apk_output_json = JSON.parse(File.read(apk_output_json_path))
102
+ build_number = apk_output_json.first["apkInfo"]["versionCode"]
103
+ version_number = apk_output_json.first["apkInfo"]["versionName"]
104
+ end
105
+ # 如果output.json文件里取不到则从Actions.lane_context中取
106
+ if build_number.nil? || version_number.nil
107
+ if Actions.lane_context[:ANDROID_VERSION_NAME].nil? || Actions.lane_context[:ANDROID_VERSION_CODE].nil?
108
+ UI.important "Actions.lane_context 不包含[ANDROID_VERSION_NAME, ANDROID_VERSION_CODE],请配置fastlane env,推荐使用fastlane-plugin-versioning_android。"
109
+ else
110
+ build_number = Actions.lane_context[SharedValues::ANDROID_VERSION_CODE]
111
+ version_number = Actions.lane_context[SharedValues::ANDROID_VERSION_NAME]
112
+ end
102
113
  end
103
114
  when ".app"
104
115
  bucket_path = "#{path_for_app_name}/Mac"
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Alioss
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - woodwu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2019-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry