fastlane-plugin-zhuixi_build_app 1.1.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0f34b6bcfccf78451954690a761669d3be0715cfd2bab6789c4887a61362436
4
- data.tar.gz: 934901b3247745591c0c8338df2b232a266fe3793992a5577431413930a48535
3
+ metadata.gz: 451978bd42e57b00635fefdd8d773fba66e9c5018de27c7429ce4d7658fc9917
4
+ data.tar.gz: f44a23086a1b71877b123c1eb4e9d4528b20bd9e7a8981727d8af092bb4bb083
5
5
  SHA512:
6
- metadata.gz: 85b9e8e2e0af33e25cd886c1180babbaa525421717d0b1bc2e815ece3b2ae8b189198ad52deca8329067a18671d3df78fd37a7dccf313cdaaa7b073aae434644
7
- data.tar.gz: fa32530a18643952328dd317b49c35af414f94b27231df770880ef6cda23a216b3e837d7a60fa12378c630455d39e9d9641d02eb83debab026c12da063480daf
6
+ metadata.gz: d4db3b66f973751b12327a6630adf4b6b2a3b3218c32f0fe2b4fb49cd5af3fc91ccea9d69fa5aa9e6b94240df4f5fe9b868105693506fd07a1625bec210e7eac
7
+ data.tar.gz: ea477a10635e4e4b704514740241228b9604fc20d17e807a12fe691f1f3eb026b5a76dbfcbbcb5868109f83fc6b1d70983beba774da152b46cf4013723f9a462
@@ -394,19 +394,21 @@ module Fastlane
394
394
  lane_context[:target].resources_build_phase.add_file_reference(channel_icon_ref) if channel_icon_ref
395
395
 
396
396
  badge_path = Fastlane::Helper::ZhuixiBuildAppHelper.get_badge_path(lane_context[:selectPlatformName])
397
- puts "ZHUIXI---角标路径:\n" + badge_path
398
- badge = MiniMagick::Image.open(badge_path)
399
- Dir.glob("#{channel_icon_path}/**/*.png").each do |image_path|
400
- puts "image_path: #{image_path}"
401
- image = MiniMagick::Image.open(image_path)
402
- height = image.height
403
- width = image.width
404
- result = image.composite(badge) do |c|
405
- c.compose "Over"
406
- c.gravity "SouthEast"
407
- c.resize "#{width}x#{height}" # 调整为原图大小
397
+ if File.exist?(badge_path)
398
+ puts "ZHUIXI---角标路径:\n" + badge_path
399
+ badge = MiniMagick::Image.open(badge_path)
400
+ Dir.glob("#{channel_icon_path}/**/*.png").each do |image_path|
401
+ puts "image_path: #{image_path}"
402
+ image = MiniMagick::Image.open(image_path)
403
+ height = image.height
404
+ width = image.width
405
+ result = image.composite(badge) do |c|
406
+ c.compose "Over"
407
+ c.gravity "SouthEast"
408
+ c.resize "#{width}x#{height}" # 调整为原图大小
409
+ end
410
+ result.write(image_path)
408
411
  end
409
- result.write(image_path)
410
412
  end
411
413
  end
412
414
 
@@ -14,7 +14,7 @@ module Fastlane
14
14
  # 返回对应渠道的角标图片路径
15
15
  def self.get_badge_path(channel)
16
16
  root_path = Dir.pwd
17
- File.join(root_path, "resources", "#{channel}_badge.png")
17
+ File.join(root_path, "assets", "#{channel}_badge.png")
18
18
  end
19
19
 
20
20
  def self.clean_storyboard_cache(channel_storyboard_path, channel)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module ZhuixiBuildApp
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-zhuixi_build_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RedSevenMale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -158,6 +158,7 @@ extra_rdoc_files: []
158
158
  files:
159
159
  - LICENSE
160
160
  - README.md
161
+ - assets/闪狐_badge.png
161
162
  - lib/fastlane/plugin/zhuixi_build_app.rb
162
163
  - lib/fastlane/plugin/zhuixi_build_app/actions/base_action.rb
163
164
  - lib/fastlane/plugin/zhuixi_build_app/actions/download_resources_action.rb