Class: Fastlane::Actions::ImportCertificateAction
Class Method Summary
collapse
action_name, author, details, output, return_value, sh, step_text
Class Method Details
.authors ⇒ Object
34
35
36
|
# File 'lib/fastlane/actions/import_certificate.rb', line 34
def self.authors
["gin0606"]
end
|
.available_options ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/fastlane/actions/import_certificate.rb', line 19
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :keychain_name,
env_name: "KEYCHAIN_NAME",
description: "Keychain the items should be imported to",
optional: false),
FastlaneCore::ConfigItem.new(key: :certificate_path,
description: "Path to certificate",
optional: false),
FastlaneCore::ConfigItem.new(key: :certificate_password,
description: "Certificate password",
optional: true)
]
end
|
.description ⇒ Object
15
16
17
|
# File 'lib/fastlane/actions/import_certificate.rb', line 15
def self.description
"Import certificate from inputfile into a keychain"
end
|
.is_supported?(platform) ⇒ Boolean
38
39
40
|
# File 'lib/fastlane/actions/import_certificate.rb', line 38
def self.is_supported?(platform)
true
end
|
.run(params) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/fastlane/actions/import_certificate.rb', line 6
def self.run(params)
command = "security import #{params[:certificate_path].shellescape} -k ~/Library/Keychains/#{params[:keychain_name].shellescape}"
command << " -P #{params[:certificate_password].shellescape}" if params[:certificate_password]
command << " -T /usr/bin/codesign"
command << " -T /usr/bin/security"
Fastlane::Actions.sh(command, log: false)
end
|