Class: Fastlane::Actions::ApplitoolsifyAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::ApplitoolsifyAction
- Defined in:
- lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .return_value ⇒ Object
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
30 31 32 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 30 def self. ["Serhii Ovchynnyk"] end |
.available_options ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 43 def self. [ # FastlaneCore::ConfigItem.new(key: :your_option, # env_name: "APPLITOOLSIFY_YOUR_OPTION", # description: "A description of your option", # optional: false, # type: String) FastlaneCore::ConfigItem.new(key: :applitoolsify_input, env_name: "APPLITOOLSIFY_INPUT", description: "Path to your original file to modify", optional: false, type: String, verify_block: proc do |value| UI.user_error!("Could not find file at path '#{File.expand_path(value)}'") unless File.exist?(value) UI.user_error!("'#{value}' doesn't seem to be an valid file") unless value.end_with?(".ipa") || value.end_with?(".app") end), FastlaneCore::ConfigItem.new(key: :applitoolsify_output, env_name: "APPLITOOLSIFY_OUTPUT_NAME", description: "The name of the resulting file", optional: true, type: String), ] end |
.description ⇒ Object
26 27 28 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 26 def self.description "Add Applitools SDKs to ipa and app iOS apps as fastlane-plugin" end |
.details ⇒ Object
38 39 40 41 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 38 def self.details # Optional: "Add Applitools SDKs to ipa and app iOS apps as fastlane-plugin" end |
.is_supported?(platform) ⇒ Boolean
67 68 69 70 71 72 73 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 67 def self.is_supported?(platform) # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform # # [:ios, :mac, :android].include?(platform) true end |
.return_value ⇒ Object
34 35 36 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 34 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fastlane/plugin/applitoolsify/actions/applitoolsify_action.rb', line 7 def self.run(params) UI.("The applitoolsify plugin is working!") UI.("Parameter Input Path: #{params[:applitoolsify_input]} >") input = params[:applitoolsify_input] output = params[:applitoolsify_output] if output.nil? output = input UI.("Parameter Output Empty using Input to Overwrite: > #{output}") else UI.("Parameter Output Path: > #{params[:applitoolsify_output]}") FileUtils.cp(input, output) end app_name = File.basename(input) Helper::ApplitoolsifyHelper.applitoolsify(output, app_name) UI.("The applitoolsify plugin finish working!") end |