Class: Fastlane::Actions::IxguardAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/ixguard/actions/ixguard_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



25
26
27
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 25

def self.authors
  ["Evgeniy Kubyshin"]
end

.available_optionsObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 38

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :config,
                            env_name: "IXGUARD_CONFIG_OPTION",
                         description: "The iXGuard Config file",
                            optional: false,
                                type: String),
    FastlaneCore::ConfigItem.new(key: :output,
      env_name: "IXGUARD_OUTPUT_OPTION",
      description: "The output file",
        optional: false,
        type: String),
    FastlaneCore::ConfigItem.new(key: :ipa,
      env_name: "IXGUARD_IPA_OPTION",
      description: "The ipa input file",
      optional: false,
      type: String)
  ]
end

.descriptionObject



21
22
23
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 21

def self.description
  "iXGuard build plugin"
end

.detailsObject



33
34
35
36
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 33

def self.details
  # Optional:
  "iXGuard build plugin"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
61
62
63
64
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 58

def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
  #
  # [:ios, :mac, :android].include?(platform)
  true
end

.return_valueObject



29
30
31
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 29

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/ixguard/actions/ixguard_action.rb', line 4

def self.run(params)
  require 'shellwords'

  begin
    config_file = params[:config].shellescape
    output_file = params[:output].shellescape
    ipa_file = params[:ipa].shellescape
    command = "ixguard -c=#{config_file} -o=#{output_file} #{ipa_file}"
    Fastlane::Actions.sh(command, log: false)
    FastlaneCore::CommandExecutor.execute(command: 'env -i HOME="$HOME" TERM="$TERM" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" ' + command,
      print_all: true,
      print_command: false)
  rescue => ex
    UI.user_error!("Error unzipping file: #{ex}")
  end
end