Skip to content

Commit 0ab05db

Browse files
committed
chore: Update README, CONTRIBUTING GUIDE and install.sh script for beta versions
1 parent d6cbec7 commit 0ab05db

3 files changed

Lines changed: 40 additions & 36 deletions

File tree

CONTRIBUTING.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ $ ./out/auth0 --help
3434

3535
This part is not fully fleshed out yet, but here are the steps:
3636

37-
1. Create a command (example: https://github.com/auth0/auth0-cli/blob/main/internal/cli/login.go)
38-
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)
37+
1. Create a command (example: https://github.com/auth0/auth0-cli/blob/beta/internal/cli/login.go)
38+
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)
3939

4040
Test it out by doing:
4141

@@ -60,22 +60,23 @@ We use vendoring, so the last step is required.
6060
> This is only possible if you're a repository maintainer.
6161
6262
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:
63-
- create the Release with the proper description (changelog)
63+
- create the pre-release with the proper description (changelog)
6464
- upload the binaries for the different architectures
65-
- update https://github.com/auth0/homebrew-auth0-cli with the latest binary reference
6665

67-
To release a new version:
66+
> **Note:** Homebrew and Scoop are not updated for beta releases.
67+
68+
To release a new beta version:
6869

6970
1. pull the latest changes:
70-
- `$ git checkout main`
71-
- `$ git pull origin main`
71+
- `$ git checkout beta`
72+
- `$ git pull origin beta`
7273
2. check the latest tag:
7374
- `$ git fetch`
74-
- `$ git tags`
75-
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`:
76-
- `$ git tag v0.1.2`
75+
- `$ git tag --list`
76+
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`:
77+
- `$ git tag v1.32.0-beta.2`
7778
4. push the new tag:
78-
- `$ git push origin v0.1.2`
79+
- `$ git push origin v1.32.0-beta.2`
7980

8081
The rest of the process will take place in the github action: https://github.com/auth0/auth0-cli/actions/workflows/goreleaser.yml.
8182
Once the workflow finishes, a new release will be available for the newly created tag.

README.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
[![Go Report Card](https://goreportcard.com/badge/github.com/auth0/auth0-cli?style=flat-square)](https://goreportcard.com/report/github.com/auth0/auth0-cli)
66
[![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)
77
[![Codecov](https://img.shields.io/codecov/c/github/auth0/auth0-cli?logo=codecov&style=flat-square)](https://codecov.io/gh/auth0/auth0-cli)
8-
[![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)
9-
[![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)
8+
[![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)
9+
[![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)
1010
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/auth0-cli)
1111

1212
</div>
1313

1414
---
1515

16+
> [!WARNING]
17+
> 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.
18+
1619
Build, manage and test your [Auth0](https://auth0.com/) integrations from the command line.
1720

1821
![demo](./demo.gif)
@@ -36,17 +39,11 @@ Build, manage and test your [Auth0](https://auth0.com/) integrations from the co
3639

3740
### Linux and macOS
3841

39-
Install via [Homebrew](https://brew.sh/):
40-
41-
```bash
42-
brew tap auth0/auth0-cli && brew install auth0
43-
```
44-
4542
Install via [cURL](https://curl.se/):
4643

4744
1. Download the binary. It will be placed in `./auth0`:
4845
```bash
49-
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .
46+
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/beta/install.sh | sh -s -- -b .
5047
```
5148
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:
5249
```bash
@@ -57,19 +54,11 @@ Install via [cURL](https://curl.se/):
5754
5855
### Windows
5956

60-
Install via [Scoop](https://scoop.sh/):
61-
62-
```bash
63-
scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git
64-
scoop install auth0
65-
```
66-
67-
6857
Install via [Powershell](https://learn.microsoft.com/en-us/powershell/):
6958

70-
1. Fetch latest release information with the following commands:
59+
1. Fetch the latest beta release information with the following commands:
7160
```powershell
72-
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
61+
$latestRelease = (Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases") | Where-Object { $_.prerelease -eq $true } | Select-Object -First 1
7362
$latestVersion = $latestRelease.tag_name
7463
$version = $latestVersion -replace "^v"
7564
```
@@ -91,12 +80,14 @@ Install via [Go](https://go.dev/):
9180
```bash
9281
# Make sure your $GOPATH/bin is exported on your $PATH
9382
# to be able to run the binary from any directory.
94-
go install github.com/auth0/auth0-cli/cmd/auth0@latest
83+
# Replace <beta-tag> with the latest beta release tag (e.g. v1.33.0-beta.1).
84+
# See https://github.com/auth0/auth0-cli/releases for available tags.
85+
go install github.com/auth0/auth0-cli/cmd/auth0@<beta-tag>
9586
```
9687

9788
### Manual
9889

99-
1. Download the appropriate binary for your environment from the [latest release](https://github.com/auth0/auth0-cli/releases/latest/)
90+
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
10091
2. Extract the archive
10192
- **macOS**: `$ tar -xf auth0-cli_{version}_Darwin_{architecture}.tar.gz`
10293
- **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
282273
283274
- [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
284275
- [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
285-
- [This repo's contribution guide](https://github.com/auth0/auth0-cli/blob/main/CONTRIBUTING.md)
276+
- [This repo's contribution guide](https://github.com/auth0/auth0-cli/blob/beta/CONTRIBUTING.md)
286277
287278
### Raise an issue
288279
@@ -303,4 +294,4 @@ Please do not report security vulnerabilities on the public GitHub issue tracker
303294
</p>
304295
<p align="center">Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout <a href="https://auth0.com/why-auth0">Why Auth0?</a></p>
305296
<p align="center">
306-
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-cli/blob/main/LICENSE"> LICENSE</a> file for more info.</p>
297+
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-cli/blob/beta/LICENSE"> LICENSE</a> file for more info.</p>

install.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Usage: $this [-b] bindir [-d] [tag]
1111
-d turns on debug logging
1212
[tag] is a tag from
1313
https://github.com/auth0/auth0-cli/releases
14-
If tag is missing, then the latest will be used.
14+
If tag is missing, then the latest beta (pre-release) will be used.
1515
1616
Generated by godownloader
1717
https://github.com/goreleaser/godownloader
@@ -296,7 +296,19 @@ http_copy() {
296296
github_release() {
297297
owner_repo=$1
298298
version=$2
299-
test -z "$version" && version="latest"
299+
if test -z "$version"; then
300+
# Fetch the list of releases and pick the first pre-release (beta)
301+
apiurl="https://api.github.com/repos/${owner_repo}/releases"
302+
json=$(http_copy "$apiurl" "Accept:application/json")
303+
test -z "$json" && return 1
304+
version=$(echo "$json" | tr -s '\n' ' ' | grep -o '"tag_name":"[^"]*","[^"]*":[^,]*,"prerelease":true' | head -1 | sed 's/"tag_name":"//;s/".*//')
305+
if test -z "$version"; then
306+
log_crit "unable to find a pre-release - see https://github.com/${owner_repo}/releases for available beta releases"
307+
return 1
308+
fi
309+
echo "$version"
310+
return 0
311+
fi
300312
giturl="https://github.com/${owner_repo}/releases/${version}"
301313
json=$(http_copy "$giturl" "Accept:application/json")
302314
test -z "$json" && return 1

0 commit comments

Comments
 (0)