Class: Fastlane::Actions::AppInfoAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AppInfoAction
- Defined in:
- lib/fastlane/plugin/app_info/actions/app_info_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .print_table(raw) ⇒ Object
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
37 38 39 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 37 def self. ["icyleaf <[email protected]>"] end |
.available_options ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 55 def self. [ FastlaneCore::ConfigItem.new(key: :file, env_name: 'APP_INFO_FILE', description: 'Path to your ipa, apk and aab file file. Optional if you use the `gym`, `ipa` or `xcodebuild` action. ', default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] || Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] || Dir['*.ipa'].last || Dir['*.apk'].last, optional: true, verify_block: proc do |value| raise "Couldn't find app file".red unless File.exist?(value) end), FastlaneCore::ConfigItem.new(key: :clean, env_name: 'APP_INFO_CLEAN', description: 'Clean cache files to reduce disk size', default_value: true, optional: true) ] end |
.description ⇒ Object
33 34 35 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 33 def self.description "Parse and dump mobile app(ipa, apk and aab file) metedata." end |
.details ⇒ Object
41 42 43 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 41 def self.details "Teardown tool for mobile app(ipa, apk and aab file), analysis metedata like version, name, icon etc." end |
.is_supported?(platform) ⇒ Boolean
73 74 75 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 73 def self.is_supported?(platform) %i[ios android].include?(platform) end |
.output ⇒ Object
49 50 51 52 53 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 49 def self.output [ [SharedValues::APP_INFO.to_s, 'The JSON formated metadata of given app'] ] end |
.print_table(raw) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 26 def self.print_table(raw) puts Terminal::Table.new( title: "Summary for app_info #{AppInfo::VERSION}".green, rows: Helper::AppInfoHelper.hash_to_columns(raw) ) end |
.return_value ⇒ Object
45 46 47 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 45 def self.return_value "Returns a Hash formated metadata of given app" end |
.run(params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fastlane/plugin/app_info/actions/app_info_action.rb', line 11 def self.run(params) file = params.fetch(:file) UI.user_error! 'You have to either pass an ipa, apk or aab file' unless file file = File.(file) app = ::AppInfo.parse(file) raw = Helper::AppInfoHelper.raw_data(app) UI.verbose "Raw params: #{raw}" print_table(raw) app.clear! if params.fetch(:clean) Helper::AppInfoHelper.store_sharedvalue(:APP_INFO, JSON.dump(raw)) raw end |