homebrew-core/Formula/heroku.rb
2018-02-14 09:14:23 +01:00

31 lines
1 KiB
Ruby

require "language/node"
class Heroku < Formula
desc "Command-line client for the cloud PaaS"
homepage "https://cli.heroku.com"
url "https://registry.npmjs.org/heroku-cli/-/heroku-cli-6.15.25.tgz"
sha256 "627418b677e2a251a80ec119c180ee15d1a6437bdf660a6e3b2137146f78f158"
head "https://github.com/heroku/cli.git"
bottle do
cellar :any_skip_relocation
sha256 "9075fc223b0f871ed436b5dea284dd73c8b68b6cd21795cf2d80f4d2306e8405" => :high_sierra
sha256 "7bbf9e3b8d4be0d5b379c2b20682bb9a7129a9c2ff92bbc9c1142ca3d98d1d04" => :sierra
sha256 "e964b808e0b02e46b3504ae1cdeb0a11cc57dec2a0c9143ea39a7729dbbf676a" => :el_capitan
end
depends_on "node"
def install
inreplace "bin/run" do |s|
s.gsub! "npm update -g heroku-cli", "brew upgrade heroku"
s.gsub! "#!/usr/bin/env node", "#!#{Formula["node"].opt_bin}/node"
end
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
system bin/"heroku", "version"
end
end