Sha256: 7a2f5e1fe3462500f5ebf02b419ab1a2ed996ea76b35f979f04bc8c6601d1b0f

Contents?: true

Size: 1.57 KB

Versions: 21

Compression:

Stored size: 1.57 KB

Contents

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

    class CertAction < Action
      def self.run(params)
        require 'cert'
        require 'cert/options'

        return if Helper.test?

        FastlaneCore::UpdateChecker.start_looking_for_update('cert') unless Helper.is_test?

        begin
          Dir.chdir(FastlaneFolder.path || Dir.pwd) do
            # This should be executed in the fastlane folder

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

            Cert::CertRunner.run
            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

            Helper.log.info("Use signing certificate '#{certificate_id}' from now on!".green)

            ENV["SIGH_CERTIFICATE_ID"] = certificate_id # for further use in the sigh action
          end
        ensure
          FastlaneCore::UpdateChecker.show_update_status('cert', Cert::VERSION)
        end
      end

      def self.description
        "Fetch or generate the latest available code signing identity"
      end

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

      def self.author
        "KrauseFx"
      end

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
fastlane-1.7.0 lib/fastlane/actions/cert.rb
fastlane-1.6.0 lib/fastlane/actions/cert.rb
fastlane-1.5.0 lib/fastlane/actions/cert.rb
fastlane-1.4.0 lib/fastlane/actions/cert.rb
fastlane-1.3.2 lib/fastlane/actions/cert.rb
fastlane-1.3.1 lib/fastlane/actions/cert.rb
fastlane-1.3.0 lib/fastlane/actions/cert.rb
fastlane-1.2.3 lib/fastlane/actions/cert.rb
fastlane-1.2.2 lib/fastlane/actions/cert.rb
fastlane-1.2.1 lib/fastlane/actions/cert.rb
fastlane-1.2.0 lib/fastlane/actions/cert.rb
fastlane-1.1.0 lib/fastlane/actions/cert.rb
fastlane-1.0.2 lib/fastlane/actions/cert.rb
fastlane-1.0.1 lib/fastlane/actions/cert.rb
fastlane-1.0.0 lib/fastlane/actions/cert.rb
fastlane-0.13.0 lib/fastlane/actions/cert.rb
fastlane-0.12.5 lib/fastlane/actions/cert.rb
fastlane-0.12.4 lib/fastlane/actions/cert.rb
fastlane-0.12.3 lib/fastlane/actions/cert.rb
fastlane-0.12.2 lib/fastlane/actions/cert.rb