From 3927fc2ef377224c51f9c4e8387cd854245c7024 Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Fri, 26 Feb 2021 17:24:57 -0300 Subject: [PATCH] chore: add brew --- .goreleaser.yml | 68 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d2ce60741..2591fcabc 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,31 +1,57 @@ # Documentation at http://goreleaser.com builds: -- main: ./cmd/auth0 - env: - - CGO_ENABLED=0 - goarch: - - amd64 - goos: - - darwin - - linux - - windows - binary: auth0 + - main: ./cmd/auth0 + env: + - CGO_ENABLED=0 + goarch: + - amd64 + goos: + - darwin + - linux + - windows + binary: auth0 archives: -- replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 - files: - - none* + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 + files: + - none* checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" snapshot: name_template: "{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - "^docs:" + - "^test:" +brews: + - + tap: + owner: auth0 + name: homebrew-auth0-cli + commit_author: + name: auth0 + email: support@auth0.com + homepage: https://cli.auth0.com + description: Auth0 CLI + install: | + bin.install "auth0" + rm Dir["#{bin}/{auth0-completion.bash,auth0-completion.zsh}"] + system bin/"auth0", "completion", "--shell", "bash" + system bin/"auth0", "completion", "--shell", "zsh" + bash_completion.install "auth0-completion.bash" + zsh_completion.install "auth0-completion.zsh" + (zsh_completion/"_auth0").write <<~EOS + #compdef auth0 + _auth0 () { + local e + e=$(dirname ${funcsourcetrace[1]%:*})/auth0-completion.zsh + if [[ -f $e ]]; then source $e; fi + } + EOS + caveats: "Thanks for installing Auth0 CLI"