dctlenv/libexec/dctlenv-list-remote

10 lines
329 B
Bash
Executable File

#!/usr/bin/env bash
set -uo pipefail
driftctl_url=https://api.github.com/repos/cloudskiff/driftctl/tags\?page\=1\&per_page\=1000
remote_versions="$(curlw -sSf $driftctl_url)" || log_error "Failed to download remote versions from GitHub"
echo $remote_versions | grep -o '"name": "v[^"]*"' | cut -d '"' -f 4 | cut -c 2- | sort