Sha256: 39c89b28a040ddab291daf859435246e9e3bded9d4eaaad12f29c000c3a29caf

Contents?: true

Size: 1.11 KB

Versions: 34

Compression:

Stored size: 1.11 KB

Contents

module FastlaneCore
  class KeychainImporter
    def self.import_file(path, keychain_path, keychain_password: "", certificate_password: "", output: $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 `security -h | grep set-key-partition-list`.length > 0
        command = "security set-key-partition-list"
        command << " -S apple-tool:,apple:"
        command << " -k \"#{keychain_password}\""
        command << " #{keychain_path.shellescape}"
        command << " &> /dev/null" unless output

        Helper.backticks(command, print: output)
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
fastlane-2.14.2 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.14.1 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.14.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.13.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.12.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.11.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.10.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.9.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.8.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.7.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.6.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.5.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.4.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.3.1 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.3.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.2.0 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.1.3 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.1.2 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane-2.1.1 fastlane_core/lib/fastlane_core/keychain_importer.rb
fastlane_core-1.0.0 lib/fastlane_core/keychain_importer.rb