diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60ae783..aeba6e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,4 +53,5 @@ jobs: version: latest args: release --clean env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 62d8858..f4a7b79 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -61,11 +61,30 @@ changelog: # Shows clickable PR links (#123) and usernames (@user) use: github-native -# Uncomment if you want to publish to a package manager -# brews: -# - name: uaa-cli -# homepage: https://github.com/cloudfoundry/uaa-cli -# description: "A command line client for the CloudFoundry UAA API" -# repository: -# owner: cloudfoundry -# name: homebrew-tap \ No newline at end of file +homebrew_casks: + - name: uaa-cli + homepage: https://github.com/cloudfoundry/uaa-cli + description: "CLI for UAA written in Go" + license: "Apache-2.0" + repository: + owner: cloudfoundry + name: homebrew-tap + branch: master + token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" + # This will update the existing formula safely + commit_author: + name: cf-identity + email: cf-identity-eng@pivotal.io + commit_msg_template: "Release {{ .ProjectName }} {{ .Tag }}" + # Conflicts with the old formula-based version + conflicts: + - cask: uaa-cli + # Hooks for post-installation + hooks: + post: + install: | + if OS.mac? + Dir.glob("#{staged_path}/uaa*").each do |file| + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", file] + end + end \ No newline at end of file diff --git a/README.md b/README.md index c23768a..d034667 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,53 @@ See the [Command Reference](docs/commands.md) for the full list of commands and - To improve the quality of help strings and error messages so that users can self-diagnose problems and unblock themselves. - To provide only the essential, highly used and/or required command options. -### Trying out the latest code +## Installation + +### Install with Go ``` -go get code.cloudfoundry.org/uaa-cli -cd $GOPATH/src/code.cloudfoundry.org/uaa-cli -make && make install +go install code.cloudfoundry.org/uaa-cli@latest uaa -h ``` -Or, install it using brew. It's been made available as part of the [cloudfoundry tap](https://github.com/cloudfoundry/homebrew-tap) +### Install with Homebrew + +Install using the Homebrew cask from the [cloudfoundry tap](https://github.com/cloudfoundry/homebrew-tap): + +```bash +# Install the cask +brew install --cask cloudfoundry/tap/uaa-cli ``` -brew install cloudfoundry/tap/uaa-cli + +If upgrading from the old formula-based version, uninstall it first +```bash +brew uninstall --force uaa-cli ``` +### Building from source + +```bash +git clone https://github.com/cloudfoundry/uaa-cli.git +cd uaa-cli +make && make install +uaa -h +``` + +### Troubleshooting Installation + +If you encounter trust warnings with Homebrew, you can either: + +1. Trust the specific tap (recommended): + ```bash + brew trust cloudfoundry/tap + ``` + +2. Or temporarily disable trust requirements: + ```bash + export HOMEBREW_NO_REQUIRE_TAP_TRUST=1 + brew install --cask cloudfoundry/tap/uaa-cli + ``` + ## Development notes ### Setting up Go