Class: Fastlane::Actions::XcsizeAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::XcsizeAction
- Defined in:
- lib/fastlane/plugin/xcsize/actions/xcsize_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
23 24 25 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 23 def self. ['Alexey Alter-Pesotskiy'] end |
.available_options ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 27 def self. [ FastlaneCore::ConfigItem.new( key: :linkmap, description: 'Set linkmap path', is_string: true, optional: false ), FastlaneCore::ConfigItem.new( key: :threshold, description: 'Set minimum size threshold in bytes', is_string: false, optional: true ) ] end |
.description ⇒ Object
19 20 21 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 19 def self.description 'Profile iOS and macOS binary size using linkmap.' end |
.example_code ⇒ Object
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 44 def self.example_code [ 'report = xcsize( linkmap: "path/to/your/linkmap.txt", threshold: 1024 ) p report[:total_size] p report[:details]' ] end |
.is_supported?(platform) ⇒ Boolean
55 56 57 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 55 def self.is_supported?(platform) [:ios, :mac].include?(platform) end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fastlane/plugin/xcsize/actions/xcsize_action.rb', line 4 def self.run(params) Actions.verify_gem!('xcsize') require 'xcsize' = {} params.all_keys.each { |k| [k] = params[k] } profiler = ::Xcsize::Profiler.new( linkmap_path: [:linkmap], threshold: [:threshold] ) profiler.profile end |