Class: Fastlane::MatchImport::CustomFileOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/match_import/custom_file_options.rb

Class Method Summary collapse

Class Method Details

.available_optionsObject



15
16
17
18
19
20
21
22
23
# File 'lib/fastlane/plugin/match_import/custom_file_options.rb', line 15

def self.available_options
  all = Fastlane::MatchImport::Options.available_options

  exclude_match_options.each do |key|
    (i = all.find_index { |item| item.key == key }) && all.delete_at(i)
  end

  return all + custom_options
end

.custom_optionsObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/fastlane/plugin/match_import/custom_file_options.rb', line 25

def self.custom_options
  [
    FastlaneCore::ConfigItem.new(key: :file_name,
                               env_name: "MATCH_IMPORT_FILENAME",
                               description: "File to import. Could contain mask like '*.txt'",
                               optional: false),
    FastlaneCore::ConfigItem.new(key: :destination_path,
                               env_name: "MATCH_IMPORT_DESTINATION_PATH",
                               description: "Path to copy imported file to",
                               optional: true),
    FastlaneCore::ConfigItem.new(key: :source_path,
                               env_name: "MATCH_IMPORT_SOURCE_PATH",
                               description: "Path to take importing file from",
                               optional: true)
  ]
end

.exclude_match_optionsObject



8
9
10
11
12
13
# File 'lib/fastlane/plugin/match_import/custom_file_options.rb', line 8

def self.exclude_match_options
  # [:type, :output_path, :keychain_name, :keychain_password]
  # Don't know how to exclude unused options and don't get error like:
  # Could not find option 'type' in the list of available options
  []
end