Class: Homebrew::DevCmd::Bump Private

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

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.

DO NOT EDIT MANUALLY This is an autogenerated file for dynamic methods in Homebrew::DevCmd::Bump. Please instead update this file by running bin/tapioca dsl Homebrew::DevCmd::Bump.

Defined Under Namespace

Classes: Args, VersionBumpInfo

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, dev_cmd?, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#argsHomebrew::DevCmd::Bump::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.



9
# File 'sorbet/rbi/dsl/homebrew/dev_cmd/bump.rbi', line 9

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.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'dev-cmd/bump.rb', line 59

def run
  Homebrew.install_bundler_gems!(groups: ["livecheck"])

  if args.limit.present? && !args.formula? && !args.cask?
    raise UsageError, "`--limit` must be used with either `--formula` or `--cask`."
  end

  odisabled "brew bump --force" if args.force?

  Homebrew.with_no_api_env do
    formulae_and_casks = if args.tap
      tap = Tap.fetch(T.must(args.tap))
      raise UsageError, "`--tap` cannot be used with official taps." if tap.official?

      formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
      casks = args.formula? ? [] : tap.cask_files.map { |path| Cask::CaskLoader.load(path) }
      formulae + casks
    elsif args.installed?
      formulae = args.cask? ? [] : Formula.installed
      casks = args.formula? ? [] : Cask::Caskroom.casks
      formulae + casks
    elsif args.named.present?
      if args.formula?
        args.named.to_formulae
      elsif args.cask?
        args.named.to_casks
      else
        args.named.to_formulae_and_casks
      end
    end

    formulae_and_casks = formulae_and_casks&.sort_by do |formula_or_cask|
      formula_or_cask.respond_to?(:token) ? formula_or_cask.token : formula_or_cask.name
    end

    unless Utils::Curl.curl_supports_tls13?
      begin
        ensure_formula_installed!("curl", reason: "Repology queries") unless HOMEBREW_BREWED_CURL_PATH.exist?
      rescue FormulaUnavailableError
        opoo "A newer `curl` is required for Repology queries."
      end
    end

    if formulae_and_casks.present?
      handle_formula_and_casks(formulae_and_casks)
    else
      handle_api_response
    end
  end
end