Class: Homebrew::DevCmd::CaskCi Private

Inherits:
AbstractCommand show all
Defined in:
dev-cmd/cask-ci.rb,
sorbet/rbi/dsl/homebrew/dev_cmd/cask_ci.rbi

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Implements the private helpers used by Homebrew Cask's CI workflow.

Defined Under Namespace

Classes: Args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser, ruby_cmd?

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_cannot_install, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::CaskCi::Args

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



10
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/cask_ci.rbi', line 10

def args; end

#runvoid

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'dev-cmd/cask-ci.rb', line 35

def run
  operation = args.named.fetch(0)
  cask_path = args.named.second

  case operation
  when "info"
    write_cask_info(require_cask_path!(operation, cask_path))
  when "snapshot"
    raise UsageError, "The `snapshot` operation does not accept a cask." if cask_path

    write_snapshot
  when "zap-check"
    Cask::CI::ZapCheck.run(require_cask_path!(operation, cask_path))
  when "check"
    check_snapshot(require_cask_path!(operation, cask_path))
  else
    raise UsageError, "Unknown cask CI operation: #{operation}"
  end
end