Sha256: 36a40b139c1925fe03bccba0e56a8fb6a7e2cb2d407acc74f473f1ceee553084

Contents?: true

Size: 1.94 KB

Versions: 51

Compression:

Stored size: 1.94 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      CERT_FILE_PATH = :CERT_FILE_PATH
      CERT_CERTIFICATE_ID = :CERT_CERTIFICATE_ID
    end

    class GetCertificatesAction < Action
      def self.run(params)
        require 'cert'

        return if Helper.test?

        begin
          Cert.config = params # we alread have the finished config

          Cert::Runner.new.launch
          cert_file_path = ENV["CER_FILE_PATH"]
          certificate_id = ENV["CER_CERTIFICATE_ID"]
          Actions.lane_context[SharedValues::CERT_FILE_PATH] = cert_file_path
          Actions.lane_context[SharedValues::CERT_CERTIFICATE_ID] = certificate_id

          UI.success("Use signing certificate '#{certificate_id}' from now on!")

          ENV["SIGH_CERTIFICATE_ID"] = certificate_id # for further use in the sigh action
        end
      end

      def self.description
        "Create new iOS code signing certificates (via _cert_)"
      end

      def self.details
        [
          "**Important**: It is recommended to use [match](https://github.com/fastlane/fastlane/tree/master/match) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your certificates. Use _cert_ directly only if you want full control over what's going on and know more about codesigning.",
          "Use this action to download the latest code signing identity"
        ].join("\n")
      end

      def self.available_options
        require 'cert'
        Cert::Options.available_options
      end

      def self.author
        "KrauseFx"
      end

      def self.is_supported?(platform)
        platform == :ios
      end

      def self.example_code
        [
          'get_certificates',
          'cert # alias for "get_certificates"',
          'get_certificates(
            development: true,
            username: "user@email.com"
          )'
        ]
      end

      def self.category
        :code_signing
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

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