Class: Fastlane::Actions::SetupTravisAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, author, deprecated_notes, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.authors ⇒ Object
64
65
66
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 64
def self.authors
["KrauseFx"]
end
|
.available_options ⇒ Object
54
55
56
57
58
59
60
61
62
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 54
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :force,
env_name: "FL_SETUP_TRAVIS_FORCE",
description: "Force setup, even if not executed by travis",
is_string: false,
default_value: false)
]
end
|
.category ⇒ Object
78
79
80
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 78
def self.category
:misc
end
|
.description ⇒ Object
38
39
40
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 38
def self.description
"Setup the keychain and match to work with Travis CI"
end
|
.details ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 42
def self.details
list = <<-LIST.markdown_list(true)
Creates a new temporary keychain for use with match
Switches match to `readonly` mode to not create new profiles/cert on CI
LIST
[
list,
"This action helps with Travis integration. Add this to the top of your Fastfile if you use Travis."
].join("\n")
end
|
.example_code ⇒ Object
72
73
74
75
76
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 72
def self.example_code
[
'setup_travis'
]
end
|
.is_supported?(platform) ⇒ Boolean
68
69
70
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 68
def self.is_supported?(platform)
[:ios, :mac].include?(platform)
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
25
26
27
28
29
30
31
32
|
# File 'fastlane/lib/fastlane/actions/setup_travis.rb', line 4
def self.run(params)
if !Helper.ci? && !params[:force]
UI.message("Currently not running on CI system, skipping travis setup")
return
end
password = "" keychain_name = "fastlane_tmp_keychain"
ENV["MATCH_KEYCHAIN_NAME"] = keychain_name
ENV["MATCH_KEYCHAIN_PASSWORD"] = password
UI.message("Creating temporary keychain: \"#{keychain_name}\".")
Actions::CreateKeychainAction.run(
name: keychain_name,
default_keychain: true,
unlock: true,
timeout: 3600,
lock_when_sleeps: true,
password: password
)
UI.message("Enabling readonly mode for Travis")
ENV["MATCH_READONLY"] = true.to_s
end
|