Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions lib/sdd/apps/user/auth0
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

sdd_install() {
local version=$1
local version_no_v
# Strip prefixed v from version number for package name
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
}
18 changes: 18 additions & 0 deletions test/apps/auth0.bats
Original file line number Diff line number Diff line change
@@ -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 ]
}