Created
June 27, 2017 20:50
-
-
Save jdx/c2cf943a1c353275b60c4cf4d1b0befb to your computer and use it in GitHub Desktop.
heroku npm homebrew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.11.17.tgz" | |
version "6.11.17" | |
sha256 "3242779e9103706c3264d6919aed20b20068d21048b12a6b9179564da631ecf1" | |
head "https://github.com/heroku/cli.git" | |
depends_on "node" | |
def install | |
system "npm", "install", *Language::Node.std_npm_install_args(libexec) | |
bin.install_symlink Dir["#{libexec}/bin/*"] | |
inreplace libexec/"lib/node_modules/heroku-cli/bin/run.js", /npm update -g heroku-cli/, "brew upgrade heroku" | |
inreplace libexec/"lib/node_modules/heroku-cli/bin/run", /^node "\$DIR\/run\.js"/, "#{Formula['node'].opt_bin}/node $DIR/run.js" | |
# inreplace libexec/"lib/node_modules/heroku-cli/bin/run", /^node \$DIR\/run\.js/, "#{Formula['node'].opt_bin}/node $DIR/run.js" | |
end | |
test do | |
system bin/"heroku", "version" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment