Class: Inquirex::Tools::Commands::Versions
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Inquirex::Tools::Commands::Versions
- Defined in:
- lib/inquirex/tools/commands/versions.rb
Overview
Reports and enforces version parity across the lockstep packages.
Plural on purpose: inquirex version prints this tool's own version,
inquirex versions manages the family's.
Instance Method Summary collapse
Instance Method Details
#call(set: nil, preflight: false) ⇒ void
This method returns an undefined value.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/inquirex/tools/commands/versions.rb', line 26 def call(set: nil, preflight: false, **) versions = Inquirex::Tools::Versions.new ok = if set then versions.set(set) elsif preflight then versions.preflight else versions.check end exit(1) unless ok rescue Inquirex::Tools::Error => e warn "ERROR: #{e.}" exit 1 end |