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

distribute over brew for macos #5

Closed
jasonkuhrt opened this issue Jun 21, 2019 · 5 comments
Closed

distribute over brew for macos #5

jasonkuhrt opened this issue Jun 21, 2019 · 5 comments

Comments

@jasonkuhrt
Copy link

Great tool, good job, and many thanks!

Being able to brew install yj would be a nice-to-have. Open to this?

@sclevine
Copy link
Owner

It's on my list, but my list is long. 😄

Would you be open to contributing a yj formula to homebrew-core?

@jasonkuhrt
Copy link
Author

Cool. Yep totally open, but also a long list :D This would be a nice opportunity to learn how to do this too. If I can find the time I'll give it a shot or else maybe someone else will get to it first.

@sclevine
Copy link
Owner

This seems to work with brew install yj.rb:

require "language/go"

class Yj < Formula
  desc "CLI to convert between YAML, TOML, JSON, and HCL."
  homepage "https://github.com/sclevine/yj"

  url "https://github.com/sclevine/yj/archive/v4.0.0.tar.gz"
  sha256 "8423486cdc0f6bd912bdcb9f61ef89427a70b094352c45e62b1343c9b2ea92f4"
  head "https://github.com/sclevine/yj"

  depends_on "go" => :build

  def install
    system "go", "build", "-o", bin/"yj", "."
  end

  test do
    assert_match '{"a":1}', shell_output("echo a=1|#{bin}/yj -t", 0)
  end
end

My local homebrew install appears to be too broken to run brew audit, and the Acceptable Formulae criteria discourage authors from submitting their own work. Feel free to PR this to homebrew-core if you'd like to.

@sclevine
Copy link
Owner

Finally got around to this: Homebrew/homebrew-core#58620

@sclevine
Copy link
Owner

Merged: brew install yj

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

No branches or pull requests

2 participants