Class: Fastlane::Actions::EnvironmentVariableAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, authors, deprecated_notes, details, example_code, lane_context, method_missing, other_action, output, return_value, sample_return_value, shell_out_should_use_bundle_exec?
Class Method Details
.author ⇒ Object
26
27
28
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 26
def self.author
"taquitos"
end
|
.available_options ⇒ Object
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
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 30
def self.available_options
[
FastlaneCore::ConfigItem.new(
key: :set,
env_name: 'FL_ENVIRONMENT_VARIABLE_SET',
description: 'Set the environment variables named',
optional: true,
type: Hash
),
FastlaneCore::ConfigItem.new(
key: :get,
env_name: 'FL_ENVIRONMENT_VARIABLE_GET',
description: 'Get the environment variable named',
optional: true,
is_string: true
),
FastlaneCore::ConfigItem.new(
key: :remove,
env_name: 'FL_ENVIRONMENT_VARIABLE_REMOVE',
description: 'Remove the environment variable named',
optional: true,
is_string: true
)
]
end
|
.category ⇒ Object
64
65
66
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 64
def self.category
:misc
end
|
.description ⇒ Object
56
57
58
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 56
def self.description
"Sets/gets env vars for Fastlane.swift. Don't use in ruby, use `ENV[key] = val`"
end
|
.is_supported?(platform) ⇒ Boolean
72
73
74
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 72
def self.is_supported?(platform)
true
end
|
.return_type ⇒ Object
68
69
70
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 68
def self.return_type
:string
end
|
.run(params) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 4
def self.run(params)
values_to_set = params[:set]
value_to_get = params[:get]
value_to_remove = params[:remove]
ENV[value_to_remove] = nil unless value_to_remove.nil?
unless values_to_set.nil?
values_to_set.each do |key, value|
ENV[key] = value
end
end
return ENV[value_to_get] unless value_to_get.nil?
return ""
end
|
.step_text ⇒ Object
60
61
62
|
# File 'fastlane/lib/fastlane/actions/environment_variable.rb', line 60
def self.step_text
nil
end
|