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

Get a starting formula PR'ed to the homebrew core repo #47

Open
acidjazz opened this issue Jun 6, 2024 · 0 comments
Open

Get a starting formula PR'ed to the homebrew core repo #47

acidjazz opened this issue Jun 6, 2024 · 0 comments

Comments

@acidjazz
Copy link
Contributor

acidjazz commented Jun 6, 2024

class Vci < Formula
  desc "VulnCheck command-line tool"
  homepage "https://github.com/vulncheck-oss/cli"
  url "https://github.com/vulncheck-oss/cli/archive/refs/tags/v0.4.2.tar.gz"
  sha256 "d06798ef8321c08835c9370fbe4545ecf0eb5c9b21cbc7db3f6e090ce34fafd7"
  license "Apache-2.0"

  head "https://github.com/vulncheck-oss/cli.git", branch: "main"

  livecheck do
    url :stable
    strategy :github_latest
  end

  depends_on "go" => :build

  deny_network_access! [:postinstall, :test]

  def install
    with_env(
      "VC_VERSION" => version.to_s,
      "GO_LDFLAGS" => "-s -w -X main.updaterEnabled=vulncheck-oss/cli",
    ) do
      system "make", "bin/vci", "manpages"
    end
    bin.install "bin/vci"
    generate_completions_from_executable(bin/"vci", "completion")
  end

  test do
    assert_match "vci version #{version}", shell_output("#{bin}/vci version")
    assert_match "View indices", shell_output("#{bin}/vci indices 2>&1")
    assert_match "Browse or list an index", shell_output("#{bin}/vci index 2>&1")
  end
end

https://docs.brew.sh/Adding-Software-to-Homebrew#formulae

@acidjazz acidjazz changed the title Get a starting foremula PR'ed to the homebrew core repo Get a starting formula PR'ed to the homebrew core repo Jun 6, 2024
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

1 participant