diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 66ddd2b..d5fe3ea 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -54,7 +54,6 @@ brews: # Templates: allowed. name: git-hooks - # Headers to include in the `url` stanza. # This can be a more modern alternative to `download_strategy` in some # cases. @@ -68,15 +67,10 @@ brews: download_strategy: CurlDownloadStrategy - # Git author used to commit to the repository. - commit_author: - name: goreleaserbot - email: bot@goreleaser.com - # The project name and current git tag are used in the format string. # # Templates: allowed. - commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" + commit_msg_template: "chore(brew): update formula for {{ .ProjectName }} version {{ .Tag }}" # Directory inside the repository to put the formula. directory: Formula @@ -100,28 +94,16 @@ brews: # Packages your package depends on. dependencies: - name: git - # Allow to specify the OS in which the dependency is required. - # Valid options are `mac` and `linux`. - os: mac - - name: zsh + - name: gitleaks type: optional - # So you can `brew test` your formula. # # Template: allowed test: | system "#{bin}/git-hooks" - - # Additional install instructions so you don't need to override `install`. - # - # Template: allowed - extra_install: | - bash_completion.install "completions/foo.bash" => "foo" - - # Repository to push the generated files to. repository: # Repository owner. @@ -142,23 +124,3 @@ brews: token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" - - # Sets up pull request creation instead of just pushing to the given branch. - # Make sure the 'branch' property is different from base before enabling - # it. - # - # This might require a personal access token. - pull_request: - # Whether to enable it or not. - enabled: true - - # Whether to open the PR as a draft or not. - draft: true - - - # Base can also be another repository, in which case the owner and name - # above will be used as HEAD, allowing cross-repository pull requests. - base: - owner: lvrach - name: homebrew-tap - branch: main diff --git a/Formula/git-hooks.rb b/Formula/git-hooks.rb deleted file mode 100644 index 7acea0e..0000000 --- a/Formula/git-hooks.rb +++ /dev/null @@ -1,78 +0,0 @@ -# typed: false -# frozen_string_literal: true - -# This file was generated by GoReleaser. DO NOT EDIT. -class GitHooks < Formula - desc "" - homepage "https://github.com/lvrach/git-hooks/" - version "0.0.1-rc2" - - depends_on "git" if OS.mac? - depends_on "zsh" => :optional - - on_macos do - on_intel do - url "https://github.com/lvrach/git-hooks/releases/download/v0.0.1-rc2/git-hooks_Darwin_x86_64.tar.gz", using: CurlDownloadStrategy, - headers: [ - "Accept: application/octet-stream", - "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}" - ] - sha256 "77c7f19f2ae842039a7f19fa4fbb0f990a6a0f1aa6a2bcb0f10634cd3fcf393e" - - def install - bin.install "git-hooks" - bash_completion.install "completions/foo.bash" => "foo" - end - end - on_arm do - url "https://github.com/lvrach/git-hooks/releases/download/v0.0.1-rc2/git-hooks_Darwin_arm64.tar.gz", using: CurlDownloadStrategy, - headers: [ - "Accept: application/octet-stream", - "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}" - ] - sha256 "e1780720ebe268bd46f5107f9259c5ff6d4ca7700fe2517cf9b467d4fe802b81" - - def install - bin.install "git-hooks" - bash_completion.install "completions/foo.bash" => "foo" - end - end - end - - on_linux do - on_intel do - if Hardware::CPU.is_64_bit? - url "https://github.com/lvrach/git-hooks/releases/download/v0.0.1-rc2/git-hooks_Linux_x86_64.tar.gz", using: CurlDownloadStrategy, - headers: [ - "Accept: application/octet-stream", - "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}" - ] - sha256 "a7f8417c7166b40ca2e3c2655d939eb3986497bab8e79ba02add507b8334e72a" - - def install - bin.install "git-hooks" - bash_completion.install "completions/foo.bash" => "foo" - end - end - end - on_arm do - if Hardware::CPU.is_64_bit? - url "https://github.com/lvrach/git-hooks/releases/download/v0.0.1-rc2/git-hooks_Linux_arm64.tar.gz", using: CurlDownloadStrategy, - headers: [ - "Accept: application/octet-stream", - "Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}" - ] - sha256 "c7807e11a6a9a0f3c36dc8a9f84812e3c77c54b1bee1c97f6e7f5a7b5ee5e628" - - def install - bin.install "git-hooks" - bash_completion.install "completions/foo.bash" => "foo" - end - end - end - end - - test do - system "#{bin}/git-hooks" - end -end diff --git a/main.go b/main.go index 126e2d2..699d3f9 100644 --- a/main.go +++ b/main.go @@ -10,14 +10,8 @@ import ( func main() { app := &cli.App{ - Name: "git-hooks-manager", + Name: "git-hooks", Usage: "Manage and execute Git hooks", - Flags: []cli.Flag{ - &cli.BoolFlag{ - Name: "configure", - Usage: "Configure Git to use this tool for hooks", - }, - }, Commands: []*cli.Command{ commands.Config, commands.Implode,