Sha256: e393c552c8aeb7a863aceffb626069e092bba03cceafacca368b4ed761ce253f

Contents?: true

Size: 1.92 KB

Versions: 72

Compression:

Stored size: 1.92 KB

Contents

require 'commander'
require 'fastlane/version'
require 'fastlane_core/ui/help_formatter'
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, FastlaneCore::HelpFormatter

      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

72 entries across 72 versions & 4 rubygems

Version Path
fastlane-2.225.0 cert/lib/cert/commands_generator.rb
fastlane-2.224.0 cert/lib/cert/commands_generator.rb
fastlane-2.223.1 cert/lib/cert/commands_generator.rb
fastlane-2.223.0 cert/lib/cert/commands_generator.rb
fastlane-2.222.0 cert/lib/cert/commands_generator.rb
fastlane-2.221.1 cert/lib/cert/commands_generator.rb
fastlane-2.221.0 cert/lib/cert/commands_generator.rb
fastlane-2.220.0 cert/lib/cert/commands_generator.rb
fastlane-2.219.0 cert/lib/cert/commands_generator.rb
fastlane-2.218.0 cert/lib/cert/commands_generator.rb
fastlane-security-patched-2.216.0 cert/lib/cert/commands_generator.rb
fastlane-2.217.0 cert/lib/cert/commands_generator.rb
fastlane-2.216.0 cert/lib/cert/commands_generator.rb
fastlane-2.215.1 cert/lib/cert/commands_generator.rb
fastlane-2.215.0 cert/lib/cert/commands_generator.rb
fastlane-mercafacil-2.214.0 cert/lib/cert/commands_generator.rb
fastlane-2.214.0 cert/lib/cert/commands_generator.rb
fastlane-2.213.0 cert/lib/cert/commands_generator.rb
fastlane-2.212.2 cert/lib/cert/commands_generator.rb
fastlane_pricing_fix-2.212.1 cert/lib/cert/commands_generator.rb