Homebrew package
peterwwillis opened this issue · 5 comments
Hi,
I don't at the moment have a system with which to finish this, but here's a sample Homebrew Formulae that might work:
# Documentation: https://docs.brew.sh/Formula-Cookbook
# https://rubydoc.brew.sh/Formula
class GitCredentialOauth < Formula
desc "A Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth."
homepage "https://github.com/hickford/git-credential-oauth"
url "https://github.com/hickford/git-credential-oauth/archive/refs/tags/v0.7.0.tar.gz"
sha256 "017bd47edc0dd3057323d8b9ccca008b7ebca7aedf6862b1ebca5e54f5a62496"
#head "https://github.com/hickford/git-credential-oauth"
license "Apache-2.0"
livecheck do
url :stable
strategy :github_latest
end
depends_on "go" => :build
def install
system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"git-credential-oauth"), "main.go"
end
test do
system bin/"git-credential-oauth", "configure"
end
end
I don't know how you generate your builds (does Go just build for any architecture regardless of your host CPU?) but if you needed a Mac platform to test Homebrew on, CircleCI supports all major platforms and is free for OSS projects: https://circleci.com/open-source/
Thanks for sharing. Did you write this manually or is this the output of brew create
?
brew create --go https://github.com/hickford/git-credential-oauth
I think I cribbed it from the go-jira
Formula
Maybe use Goreleaser as it can manage homebrew and create also a tap repo https://goreleaser.com/customization/homebrew/
In review Homebrew/homebrew-core#132580
Published at https://formulae.brew.sh/formula/git-credential-oauth#default
brew install git-credential-oauth