Class: Fastlane::Actions::DetectUnusedImageAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::DetectUnusedImageAction
- Defined in:
- lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb
Overview
无用图片检查
Class Method Summary collapse
- .available_options ⇒ Object
- .category ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.available_options ⇒ Object
40 41 42 |
# File 'lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb', line 40 def self. [] end |
.category ⇒ Object
48 49 50 |
# File 'lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb', line 48 def self.category :testing end |
.description ⇒ Object
36 37 38 |
# File 'lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb', line 36 def self.description "无用图片检测" end |
.is_supported?(platform) ⇒ Boolean
44 45 46 |
# File 'lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb', line 44 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fastlane/plugin/fastci/actions/detect_unused_image_action.rb', line 8 def self.run(params) UI.("*************| 开始无用图片检查 |*************") # 检查是否安装了 FengNiao unless system("which fengniao > /dev/null") sh("brew install mint") sh("mint install onevcat/fengniao") end fengniao_output = sh(" fengniao \ --list-only \ --exclude Carthage Pods \ ") CommonHelper.write_cached_txt(Constants.UNUSED_IMAGE_FILE, fengniao_output) # 输出无用图片检查报告 UI.("*************| 开始输出无用图片检查报告 |*************") CommonHelper.generate_and_open_html( "Unused Image Report", "generate_unused_image_html.py", Constants.UNUSED_IMAGE_FILE, Constants.UNUSED_IMAGE_HTML_FILE ) end |