Class: Fastlane::Cryptex::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/cryptex/options.rb

Class Method Summary collapse

Class Method Details

.available_optionsObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/fastlane/plugin/cryptex/options.rb', line 7

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :git_url,
                                 env_name: "CRYPTEX_GIT_URL",
                                 description: "URL to the git repo containing all the certificates",
                                 optional: false,
                                 short_option: "-r"),
    FastlaneCore::ConfigItem.new(key: :workspace,
                                                              description: nil,
                                                              verify_block: proc do |value|
                                                                unless Helper.test?
                                                                  if value.start_with?("/var/folders") or value.include?("tmp/") or value.include?("temp/")
                                                                    # that's fine
                                                                  else
                                                                    UI.user_error!("Specify the `git_url` instead of the `path`")
                                                                  end
                                                                end
                                                              end,
                                                              optional: true),
    FastlaneCore::ConfigItem.new(key: :git_branch,
                                 env_name: "CRYPTEX_GIT_BRANCH",
                                 description: "Specific git branch to use",
                                 default_value: 'master'),
    FastlaneCore::ConfigItem.new(key: :key,
                                 short_option: "-k",
                                 env_name: "CRYPTEX_FILE_KEY",
                                 description: "The File KEY",
                                 default_value: ""),
    FastlaneCore::ConfigItem.new(key: :in,
                                 short_option: "-i",
                                 env_name: "CRYPTEX_IN",
                                 description: "The File KEY",
                                 default_value: ""),

    FastlaneCore::ConfigItem.new(key: :hash,
                                 short_option: "-H",
                                 env_name: "CRYPTEX_HASH",
                                 description: "Hash",
                                 optional: true,
                                 is_string: false),
    FastlaneCore::ConfigItem.new(key: :set_env,
                                 short_option: "-e",
                                 env_name: "CRYPTEX_SET_ENV",
                                 description: "set found variables as ENV",
                                 default_value: false,
                                 is_string: false),
    FastlaneCore::ConfigItem.new(key: :out,
                                 short_option: "-o",
                                 env_name: "CRYPTEX_OUT",
                                 description: "The File KEY",
                                 default_value: ""),
    FastlaneCore::ConfigItem.new(key: :type,
                                 short_option: "-s",
                                 env_name: "CRYPTEX_TYPE",
                                 description: "Sub-Action Type (export, import, decrypt)",
                                 default_value: "export"),
    FastlaneCore::ConfigItem.new(key: :verbose,
                                 env_name: "CRYPTEX_VERBOSE",
                                 description: "Print out extra information and all commands",
                                 is_string: false,
                                 default_value: false,
                                 verify_block: proc do |value|
                                   $verbose = true if value
                                 end),
    FastlaneCore::ConfigItem.new(key: :shallow_clone,
                                 env_name: "CRYPTEX_SHALLOW_CLONE",
                                 description: "Make a shallow clone of the repository (truncate the history to 1 revision)",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :skip_docs,
                                 env_name: "CRYPTEX_SKIP_DOCS",
                                 description: "Skip generation of a README.md for the created git repository",
                                 is_string: false,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :digest,
                                 short_option: "-m",
                                 env_name: "CRYPTEX_DIGEST",
                                 description: "Specify the Message Digest to use for crypt routines",
                                 is_string: true,
                                 default_value: "md5")
  ]
end