Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add homebrew recipe #5

Open
ericfreese opened this issue Feb 10, 2017 · 2 comments
Open

Add homebrew recipe #5

ericfreese opened this issue Feb 10, 2017 · 2 comments

Comments

@ericfreese
Copy link
Owner

Base on consul formula.

@ericfreese
Copy link
Owner Author

ericfreese commented Feb 11, 2017

$ brew audit --new-formula rat
rat:
  * GitHub repository not notable enough (<20 forks, <20 watchers and <50 stars)
  * GitHub repository too new (<30 days old)
Error: 2 problems in 1 formula

Have to wait a little while for this...

In the mean time, should be able to manually save the formula below to

$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/rat.rb

and run brew install rat.

class Rat < Formula
  desc "Compose shell commands to build terminal applications"
  homepage "https://github.com/ericfreese/rat"
  url "https://github.com/ericfreese/rat.git"
  version "0.0.2"
  sha256 "9da8d67a1e16056e3f05cdf536766e5571ede54a6c241c941d6c74eee5d64d31"

  depends_on "go" => :build

  def install
    contents = Dir["{*,.git,.gitignore}"]
    gopath = buildpath/"gopath"
    (gopath/"src/github.com/ericfreese/rat").install contents

    ENV["GOPATH"] = gopath

    cd gopath/"src/github.com/ericfreese/rat" do
      system "go", "build", "-o", "rat"
      bin.install "rat"
    end
  end

  test do
    system "[", "-x", "#{bin}/rat", "]"
  end
end

@ericfreese
Copy link
Owner Author

PR submitted: Homebrew/homebrew-core#19383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant