Class: BranchIOCLI::Configuration::SetupOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/branch_io_cli/configuration/setup_options.rb

Class Method Summary collapse

Class Method Details

.available_optionsObject



5
6
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/branch_io_cli/configuration/setup_options.rb', line 5

def available_options
  [
    Option.new(
      name: :live_key,
      description: "Branch live key",
      example: "key_live_xxxx",
      type: String,
      aliases: "-L"
    ),
    Option.new(
      name: :test_key,
      description: "Branch test key",
      example: "key_test_yyyy",
      type: String,
      aliases: "-T"
    ),
    Option.new(
      name: :domains,
      description: "Comma-separated list of custom domain(s) or non-Branch domain(s)",
      example: "example.com,www.example.com",
      type: Array,
      aliases: "-D",
      confirm_symbol: :all_domains
    ),
    Option.new(
      name: :app_link_subdomain,
      description: "Branch app.link subdomain, e.g. myapp for myapp.app.link",
      example: "myapp",
      type: String,
      label: "app.link subdomain",
      skip_confirmation: true
    ),
    Option.new(
      name: :uri_scheme,
      description: "Custom URI scheme used in the Branch Dashboard for this app",
      example: "myurischeme[://]",
      type: String,
      aliases: "-U",
      label: "URI scheme",
      negatable: true,
      convert_proc: ->(value) { Configuration.uri_scheme_without_suffix(value) }
    ),
    Option.new(
      name: :setting,
      description: "Use a custom build setting for the Branch key (default: Use Info.plist)",
      example: "BRANCH_KEY_SETTING",
      type: String,
      argument_optional: true,
      aliases: "-s",
      label: "User-defined setting for Branch key"
    ),
    Option.new(
      name: :test_configurations,
      description: "List of configurations that use the test key with a user-defined setting (default: Debug configurations)",
      example: "config1,config2",
      type: Array,
      negatable: true,
      valid_values_proc: -> { Configuration.current && Configuration.current.xcodeproj.build_configurations.map(&:name) }
    ),
    Option.new(
      name: :xcodeproj,
      description: "Path to an Xcode project to update",
      example: "MyProject.xcodeproj",
      type: String,
      confirm_symbol: :xcodeproj_path,
      validate_proc: ->(path) { Configuration.open_xcodeproj path }
    ),
    Option.new(
      name: :target,
      description: "Name of a target to modify in the Xcode project",
      example: "MyAppTarget",
      type: String,
      confirm_symbol: :target_name,
      valid_values_proc: -> { Configuration.current && Configuration.current.xcodeproj.targets.map(&:name) }
    ),
    Option.new(
      name: :podfile,
      description: "Path to the Podfile for the project",
      example: "/path/to/Podfile",
      type: String,
      confirm_symbol: :podfile_path,
      validate_proc: ->(path) { Configuration.open_podfile path }
    ),
    Option.new(
      name: :cartfile,
      description: "Path to the Cartfile for the project",
      example: "/path/to/Cartfile",
      type: String,
      confirm_symbol: :cartfile_path,
      validate_proc: ->(path) { !path.nil? && File.exist?(path.to_s) },
      convert_proc: ->(path) { Configuration.absolute_path(path.to_s) unless path.nil? }
    ),
    Option.new(
      name: :carthage_command,
      description: "Command to run when installing from Carthage",
      example: "bootstrap --no-use-binaries",
      type: String,
      default_value: "update --platform ios"
    ),
    Option.new(
      name: :frameworks,
      description: "Comma-separated list of system frameworks to add to the project",
      example: "AdSupport,CoreSpotlight,SafariServices",
      type: Array
    ),
    Option.new(
      name: :pod_repo_update,
      description: "Update the local podspec repo before installing",
      default_value: true
    ),
    Option.new(
      name: :validate,
      description: "Validate Universal Link configuration",
      default_value: true
    ),
    Option.new(
      name: :force,
      description: "Update project even if Universal Link validation fails",
      default_value: false
    ),
    Option.new(
      name: :add_sdk,
      description: "Add the Branch framework to the project",
      default_value: true
    ),
    Option.new(
      name: :patch_source,
      description: "Add Branch SDK calls to the AppDelegate",
      default_value: true
    ),
    Option.new(
      name: :commit,
      description: "Commit the results to Git if non-blank",
      type: String,
      example: "message",
      argument_optional: true,
      label: "Commit message"
    )
  ] + Option.global_options
end