From 3033759bb2e5ec610fb37c597bfedf8651e20409 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Sep 2025 12:32:29 +0000 Subject: [PATCH 1/4] Initial plan From f3ba3dfcc71f55d1ab646e0847d9d0fe44826f0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Sep 2025 12:41:12 +0000 Subject: [PATCH 2/4] Add Auth0 CLI management file and test Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com> --- lib/sdd/apps/user/auth0 | 25 +++++++++++++++++++++++++ test/apps/auth0.bats | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lib/sdd/apps/user/auth0 create mode 100644 test/apps/auth0.bats diff --git a/lib/sdd/apps/user/auth0 b/lib/sdd/apps/user/auth0 new file mode 100644 index 0000000..f05f975 --- /dev/null +++ b/lib/sdd/apps/user/auth0 @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +sdd_install() { + local version=$1 + # Strip prefixed v from version number for package name + local version_no_v=$(echo $version | tr -d v) + local package=auth0-cli_${version_no_v}_Linux_x86_64 + local archive="$package".tar.gz + wget -P /tmp https://github.com/auth0/auth0-cli/releases/download/"$version"/"$archive" + + cd /tmp || return 1 + tar xfv "$archive" + mv auth0 "$SDD_INSTALL_PREFIX"/bin/auth0 + "$SDD_INSTALL_PREFIX"/bin/auth0 completion bash > "$SDD_BASH_COMPLETION_DIR"/auth0 + rm -rfv "$archive" +} + +sdd_uninstall() { + rm -fv "$SDD_INSTALL_PREFIX"/bin/auth0 + rm -fv "$SDD_BASH_COMPLETION_DIR"/auth0 +} + +sdd_fetch_latest_version() { + _tag_name_of_latest_github_release auth0 auth0-cli +} \ No newline at end of file diff --git a/test/apps/auth0.bats b/test/apps/auth0.bats new file mode 100644 index 0000000..585e241 --- /dev/null +++ b/test/apps/auth0.bats @@ -0,0 +1,18 @@ +@test "auth0 of recent version can be installed and uninstalled" { + run sdd install auth0 + [ $status -eq 0 ] + [[ "${lines[0]}" = 'Latest version available: '* ]] + [ "${lines[-1]}" = 'Succeeded to install "auth0".' ] + + run auth0 --version + [ $status -eq 0 ] + + [ -f ~/.local/share/bash-completion/completions/auth0 ] + + run sdd uninstall auth0 + [ $status -eq 0 ] + [ "${lines[-1]}" = 'Succeeded to uninstall "auth0".' ] + + run which auth0 + [ $status -eq 1 ] +} \ No newline at end of file From 7d5a74c894af614a24db7c987d1465fb7a51ffb3 Mon Sep 17 00:00:00 2001 From: pylipp Date: Wed, 24 Sep 2025 16:06:19 +0200 Subject: [PATCH 3/4] Update Changelog --- Changelog.md | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index 03935a0..0164fd4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [v0.2.X] - 2025- ### Added - App management file for [xan](https://github.com/medialab/xan) +- App management file for [auth0](https://github.com/auth0/auth0-cli), see #21 ## [v0.2.3.1] - 2025-04-01 ### Fixed diff --git a/README.md b/README.md index 7aabb1f..db54acc 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ In alphabetical order: Name | Description :--- | :--- +[auth0](https://github.com/auth0/auth0-cli) | Build, manage and test your Auth0 integrations from the command line [bat](https://github.com/sharkdp/bat) | A cat(1) clone with syntax highlighting and Git integration [borg](https://www.borgbackup.org/) | Deduplicating archiver with compression and authenticated encryption [broot](https://github.com/Canop/broot) | A new way to see and navigate directory trees From ba56c5456d3b46d09c229257d1d08245acbb5c18 Mon Sep 17 00:00:00 2001 From: pylipp Date: Wed, 24 Sep 2025 16:06:59 +0200 Subject: [PATCH 4/4] Fix shellcheck complaints --- lib/sdd/apps/user/auth0 | 5 +++-- test/apps/auth0.bats | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sdd/apps/user/auth0 b/lib/sdd/apps/user/auth0 index f05f975..2fbcb4e 100644 --- a/lib/sdd/apps/user/auth0 +++ b/lib/sdd/apps/user/auth0 @@ -2,8 +2,9 @@ sdd_install() { local version=$1 + local version_no_v # Strip prefixed v from version number for package name - local version_no_v=$(echo $version | tr -d v) + version_no_v=$(echo "$version" | tr -d v) local package=auth0-cli_${version_no_v}_Linux_x86_64 local archive="$package".tar.gz wget -P /tmp https://github.com/auth0/auth0-cli/releases/download/"$version"/"$archive" @@ -22,4 +23,4 @@ sdd_uninstall() { sdd_fetch_latest_version() { _tag_name_of_latest_github_release auth0 auth0-cli -} \ No newline at end of file +} diff --git a/test/apps/auth0.bats b/test/apps/auth0.bats index 585e241..e796eaf 100644 --- a/test/apps/auth0.bats +++ b/test/apps/auth0.bats @@ -15,4 +15,4 @@ run which auth0 [ $status -eq 1 ] -} \ No newline at end of file +}