Class: Inquirex::Tools::Commands::Publish

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/inquirex/tools/commands/publish.rb

Overview

inquirex publish — publishes every package in the family.

The orchestrator runs each package's own just publish in that package's directory, so how a package reaches its registry stays that package's business. What this adds is the order, a fresh 2FA code per gem, and stopping at the first failure.

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ void

This method returns an undefined value.

Idempotent by default: a package whose version is already on its registry is skipped, so re-running after a mid-release failure resumes rather than throwing rejections at RubyGems and npm.

Parameters:

  • options (Hash)

    parsed CLI options



37
38
39
40
41
42
43
44
45
46
# File 'lib/inquirex/tools/commands/publish.rb', line 37

def call(**options)
  ok = Inquirex::Tools::Publisher.new.call(
    dry_run: options.fetch(:dry_run, false),
    force:   options.fetch(:force, false)
  )
  exit(1) unless ok
rescue Inquirex::Tools::Error => e
  warn "ERROR: #{e.message}"
  exit 1
end