From 0ab05dbae4a92f8b994e80243b32c30df0ee888d Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Mon, 29 Jun 2026 10:46:37 +0530 Subject: [PATCH] chore: Update README, CONTRIBUTING GUIDE and install.sh script for beta versions --- CONTRIBUTING.md | 23 ++++++++++++----------- README.md | 37 ++++++++++++++----------------------- install.sh | 16 ++++++++++++++-- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd8339db4..7227fc363 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,8 +34,8 @@ $ ./out/auth0 --help This part is not fully fleshed out yet, but here are the steps: -1. Create a command (example: https://github.com/auth0/auth0-cli/blob/main/internal/cli/login.go) -2. Add the command constructor to the root command: (e.g. somewhere here: https://github.com/auth0/auth0-cli/blob/main/internal/cli/root.go) +1. Create a command (example: https://github.com/auth0/auth0-cli/blob/beta/internal/cli/login.go) +2. Add the command constructor to the root command: (e.g. somewhere here: https://github.com/auth0/auth0-cli/blob/beta/internal/cli/root.go) Test it out by doing: @@ -60,22 +60,23 @@ We use vendoring, so the last step is required. > This is only possible if you're a repository maintainer. The release is driven by a GitHub **workflow** triggered when a new **tag** is **created**. The workflow will run the checks and trigger _Goreleaser_ to: -- create the Release with the proper description (changelog) +- create the pre-release with the proper description (changelog) - upload the binaries for the different architectures -- update https://github.com/auth0/homebrew-auth0-cli with the latest binary reference -To release a new version: +> **Note:** Homebrew and Scoop are not updated for beta releases. + +To release a new beta version: 1. pull the latest changes: - - `$ git checkout main` - - `$ git pull origin main` + - `$ git checkout beta` + - `$ git pull origin beta` 2. check the latest tag: - `$ git fetch` - - `$ git tags` -3. create the **new** tag for the new release. For example, if the latest tag is `v0.1.1` and you want to release a patch version, you should create `v0.1.2`: - - `$ git tag v0.1.2` + - `$ git tag --list` +3. create the **new** beta tag. Beta releases use the format `vX.Y.Z-beta.N`. For example, if the latest tag is `v1.32.0-beta.1` and you want the next beta, create `v1.32.0-beta.2`: + - `$ git tag v1.32.0-beta.2` 4. push the new tag: - - `$ git push origin v0.1.2` + - `$ git push origin v1.32.0-beta.2` The rest of the process will take place in the github action: https://github.com/auth0/auth0-cli/actions/workflows/goreleaser.yml. Once the workflow finishes, a new release will be available for the newly created tag. diff --git a/README.md b/README.md index 43584f407..1689cb7d0 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,17 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/auth0/auth0-cli?style=flat-square)](https://goreportcard.com/report/github.com/auth0/auth0-cli) [![Release](https://img.shields.io/github/v/release/auth0/auth0-cli?logo=auth0&include_prereleases&style=flat-square)](https://github.com/auth0/auth0-cli/releases) [![Codecov](https://img.shields.io/codecov/c/github/auth0/auth0-cli?logo=codecov&style=flat-square)](https://codecov.io/gh/auth0/auth0-cli) -[![License](https://img.shields.io/github/license/auth0/auth0-cli.svg?logo=fossa&style=flat-square)](https://github.com/auth0/auth0-cli/blob/main/LICENSE) -[![Build Status](https://img.shields.io/github/actions/workflow/status/auth0/auth0-cli/go.yml?branch=main&style=flat-square&logo=github)](https://github.com/auth0/auth0-cli/actions?query=branch%3Amain) +[![License](https://img.shields.io/github/license/auth0/auth0-cli.svg?logo=fossa&style=flat-square)](https://github.com/auth0/auth0-cli/blob/beta/LICENSE) +[![Build Status](https://img.shields.io/github/actions/workflow/status/auth0/auth0-cli/go.yml?branch=beta&style=flat-square&logo=github)](https://github.com/auth0/auth0-cli/actions?query=branch%3Abeta) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/auth0-cli) --- +> [!WARNING] +> This is a **beta release** of the Auth0 CLI and is not yet generally available. Features and behavior may change before the final release. Installation via Homebrew and Scoop is not supported for beta — use cURL, PowerShell, Go, or Manual installation instead. + Build, manage and test your [Auth0](https://auth0.com/) integrations from the command line. ![demo](./demo.gif) @@ -36,17 +39,11 @@ Build, manage and test your [Auth0](https://auth0.com/) integrations from the co ### Linux and macOS -Install via [Homebrew](https://brew.sh/): - -```bash -brew tap auth0/auth0-cli && brew install auth0 -``` - Install via [cURL](https://curl.se/): 1. Download the binary. It will be placed in `./auth0`: ```bash - curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b . + curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/beta/install.sh | sh -s -- -b . ``` 2. Optionally, if you want to be able to run the binary from any directory, make sure you move it to a place in your $PATH: ```bash @@ -57,19 +54,11 @@ Install via [cURL](https://curl.se/): ### Windows -Install via [Scoop](https://scoop.sh/): - -```bash -scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git -scoop install auth0 -``` - - Install via [Powershell](https://learn.microsoft.com/en-us/powershell/): -1. Fetch latest release information with the following commands: +1. Fetch the latest beta release information with the following commands: ```powershell - $latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases/latest" + $latestRelease = (Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases") | Where-Object { $_.prerelease -eq $true } | Select-Object -First 1 $latestVersion = $latestRelease.tag_name $version = $latestVersion -replace "^v" ``` @@ -91,12 +80,14 @@ Install via [Go](https://go.dev/): ```bash # Make sure your $GOPATH/bin is exported on your $PATH # to be able to run the binary from any directory. -go install github.com/auth0/auth0-cli/cmd/auth0@latest +# Replace with the latest beta release tag (e.g. v1.33.0-beta.1). +# See https://github.com/auth0/auth0-cli/releases for available tags. +go install github.com/auth0/auth0-cli/cmd/auth0@ ``` ### Manual -1. Download the appropriate binary for your environment from the [latest release](https://github.com/auth0/auth0-cli/releases/latest/) +1. Download the appropriate binary for your environment from the [releases page](https://github.com/auth0/auth0-cli/releases) — select the most recent pre-release 2. Extract the archive - **macOS**: `$ tar -xf auth0-cli_{version}_Darwin_{architecture}.tar.gz` - **Linux**: `$ tar -xf auth0-cli_{version}_Linux_{architecture}.tar.gz` @@ -282,7 +273,7 @@ We appreciate feedback and contribution to this repo! Before you get started, pl - [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) - [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) -- [This repo's contribution guide](https://github.com/auth0/auth0-cli/blob/main/CONTRIBUTING.md) +- [This repo's contribution guide](https://github.com/auth0/auth0-cli/blob/beta/CONTRIBUTING.md) ### Raise an issue @@ -303,4 +294,4 @@ Please do not report security vulnerabilities on the public GitHub issue tracker

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

-This project is licensed under the MIT license. See the LICENSE file for more info.

+This project is licensed under the MIT license. See the LICENSE file for more info.

diff --git a/install.sh b/install.sh index 676960c97..81600de1a 100755 --- a/install.sh +++ b/install.sh @@ -11,7 +11,7 @@ Usage: $this [-b] bindir [-d] [tag] -d turns on debug logging [tag] is a tag from https://github.com/auth0/auth0-cli/releases - If tag is missing, then the latest will be used. + If tag is missing, then the latest beta (pre-release) will be used. Generated by godownloader https://github.com/goreleaser/godownloader @@ -296,7 +296,19 @@ http_copy() { github_release() { owner_repo=$1 version=$2 - test -z "$version" && version="latest" + if test -z "$version"; then + # Fetch the list of releases and pick the first pre-release (beta) + apiurl="https://api.github.com/repos/${owner_repo}/releases" + json=$(http_copy "$apiurl" "Accept:application/json") + test -z "$json" && return 1 + version=$(echo "$json" | tr -s '\n' ' ' | grep -o '"tag_name":"[^"]*","[^"]*":[^,]*,"prerelease":true' | head -1 | sed 's/"tag_name":"//;s/".*//') + if test -z "$version"; then + log_crit "unable to find a pre-release - see https://github.com/${owner_repo}/releases for available beta releases" + return 1 + fi + echo "$version" + return 0 + fi giturl="https://github.com/${owner_repo}/releases/${version}" json=$(http_copy "$giturl" "Accept:application/json") test -z "$json" && return 1