5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'fastlane_core/lib/fastlane_core/keychain_importer.rb', line 5
def self.import_file(path, keychain_path, keychain_password: "", certificate_password: "", output: FastlaneCore::Globals.verbose?)
UI.user_error!("Could not find file '#{path}'") unless File.exist?(path)
command = "security import #{path.shellescape} -k '#{keychain_path.shellescape}'"
command << " -P #{certificate_password.shellescape}"
command << " -T /usr/bin/codesign" command << " -T /usr/bin/security"
command << " &> /dev/null" unless output
Helper.backticks(command, print: output)
if Helper.backticks('security -h | grep set-key-partition-list', print: false).length > 0
command = "security set-key-partition-list"
command << " -S apple-tool:,apple:"
command << " -k #{keychain_password.to_s.shellescape}"
command << " #{keychain_path.shellescape}"
command << " &> /dev/null" unless output
Helper.backticks(command, print: output)
end
end
|