brew/Library/Contributions/cmd/brew-versions.rb
Mike McQuaid 07f0f60908 Deprecate some contributions.
This is just a starting point to start discussion. I think we have a
few options with contributions:

- Stop accepting them altogether and move the ones we need/use/support
  into core commands
- Accept them on an unsupported basis and require they be added
  manually to the PATH
- Actively support and fix bugs in them all

Closes Homebrew/homebrew#30749.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-07-10 10:24:17 -07:00

20 lines
586 B
Ruby
Executable File

require "formula_versions"
raise "Please `brew update` first" unless (HOMEBREW_REPOSITORY/".git").directory?
raise FormulaUnspecifiedError if ARGV.named.empty?
opoo <<-EOS.undent
brew-versions is unsupported and will be removed soon.
You should use the homebrew-versions tap instead:
https://github.com/Homebrew/homebrew-versions
EOS
ARGV.formulae.each do |f|
versions = FormulaVersions.new(f)
path = versions.repository_path
versions.each do |version, rev|
print "#{Tty.white}#{version.to_s.ljust(8)}#{Tty.reset} "
puts "git checkout #{rev} #{path}"
end
end