Sha256: 9e630a1168ea3fd3ef413db32b61a4f1acc53c9618b1bd753385bd16536d84a4

Contents?: true

Size: 1.18 KB

Versions: 271

Compression:

Stored size: 1.18 KB

Contents

module FastlaneCore
  class KeychainImporter
    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" # to not be asked for permission when running a tool like `gym`
      command << " -T /usr/bin/security"
      command << " &> /dev/null" unless output

      Helper.backticks(command, print: output)

      # When security supports partition lists, also add the partition IDs
      # See https://openradar.appspot.com/28524119
      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
  end
end

Version data entries

271 entries across 271 versions & 1 rubygems

Version Path
fastlane-2.74.0.beta.20180106010004 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.73.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.73.0.beta.20180105010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.73.0.beta.20180104010004 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.73.0.beta.20180103010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20180102010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20180101010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20171231010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.1 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20171230010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20171229010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.72.0.beta.20171228010004 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171227010004 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171226010004 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171225010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171224010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171223010003 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.71.0.beta.20171222010003 fastlane_core/lib/fastlane_core/keychain_importer.rb