Sha256: fcd4661a67791ab39897ec795b08845425cfe6cfc1565e6b9f8af8d8267d1780

Contents?: true

Size: 1.47 KB

Versions: 73

Compression:

Stored size: 1.47 KB

Contents

require 'commander'

require 'fastlane/version'
require 'fastlane_core/configuration/configuration'
require 'fastlane_core/ui/help_formatter'
require_relative 'options'
require_relative 'manager'

HighLine.track_eof = false

module PEM
  class CommandsGenerator
    include Commander::Methods

    def self.start
      self.new.run
    end

    def run
      program :name, 'pem'
      program :version, Fastlane::VERSION
      program :description, 'CLI for \'PEM\' - Automatically generate and renew your push notification profiles'
      program :help, 'Author', 'Felix Krause <pem@krausefx.com>'
      program :help, 'Website', 'https://fastlane.tools'
      program :help, 'Documentation', 'https://docs.fastlane.tools/actions/pem/'
      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 :renew do |c|
        c.syntax = 'fastlane pem renew'
        c.description = 'Renews the certificate (in case it expired) and shows the path to the generated pem file'

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

        c.action do |args, options|
          PEM.config = FastlaneCore::Configuration.create(PEM::Options.available_options, options.__hash__)
          PEM::Manager.start
        end
      end

      default_command(:renew)

      run!
    end
  end
end

Version data entries

73 entries across 73 versions & 4 rubygems

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