Sha256: dc8a6b0263b947fc01f2d39fecceafb9f0abd03a339385c6f346f581438e67b7

Contents?: true

Size: 1.86 KB

Versions: 58

Compression:

Stored size: 1.86 KB

Contents

require 'commander'
require 'fastlane/version'
require 'fastlane_core/configuration/configuration'
require 'fastlane_core/globals'

require_relative 'options'
require_relative 'runner'

HighLine.track_eof = false

module Cert
  class CommandsGenerator
    include Commander::Methods

    def self.start
      self.new.run
    end

    def run
      program :name, 'cert'
      program :version, Fastlane::VERSION
      program :description, 'CLI for \'cert\' - Create new iOS code signing certificates'
      program :help, 'Author', 'Felix Krause <cert@krausefx.com>'
      program :help, 'Website', 'https://fastlane.tools'
      program :help, 'Documentation', 'https://docs.fastlane.tools/actions/cert/'
      program :help_formatter, :compact

      global_option('--verbose') { FastlaneCore::Globals.verbose = true }
      global_option('--env STRING[,STRING2]', String, 'Add environment(s) to use with `dotenv`')

      command :create do |c|
        c.syntax = 'fastlane cert create'
        c.description = 'Create new iOS code signing certificates'

        FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options, command: c)

        c.action do |args, options|
          Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, options.__hash__)
          Cert::Runner.new.launch
        end
      end

      command :revoke_expired do |c|
        c.syntax = 'fastlane cert revoke_expired'
        c.description = 'Revoke expired iOS code signing certificates'

        FastlaneCore::CommanderGenerator.new.generate(Cert::Options.available_options, command: c)

        c.action do |args, options|
          Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, options.__hash__)
          Cert::Runner.new.revoke_expired_certs!
        end
      end

      default_command(:create)

      run!
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
fastlane-2.181.0 cert/lib/cert/commands_generator.rb
fastlane-2.180.1 cert/lib/cert/commands_generator.rb
fastlane-2.180.0 cert/lib/cert/commands_generator.rb
fastlane-2.179.0 cert/lib/cert/commands_generator.rb
fastlane-2.178.0 cert/lib/cert/commands_generator.rb
fastlane-2.177.0 cert/lib/cert/commands_generator.rb
fastlane-2.176.0 cert/lib/cert/commands_generator.rb
fastlane-2.175.0 cert/lib/cert/commands_generator.rb
fastlane-2.174.0 cert/lib/cert/commands_generator.rb
fastlane-2.173.0 cert/lib/cert/commands_generator.rb
fastlane-2.172.0 cert/lib/cert/commands_generator.rb
fastlane-2.171.0 cert/lib/cert/commands_generator.rb
fastlane-2.170.0 cert/lib/cert/commands_generator.rb
fastlane-2.169.0 cert/lib/cert/commands_generator.rb
fastlane-2.168.0 cert/lib/cert/commands_generator.rb
fastlane-2.167.0 cert/lib/cert/commands_generator.rb
fastlane-2.166.0 cert/lib/cert/commands_generator.rb
fastlane-2.165.0 cert/lib/cert/commands_generator.rb
fastlane-2.164.0 cert/lib/cert/commands_generator.rb
fastlane-2.163.0 cert/lib/cert/commands_generator.rb