dctlenv/libexec/dctlenv-list-remote

10 lines
326 B
Plaintext
Raw Permalink Normal View History

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