Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created February 12, 2021 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djspiewak/978d73d12396f2d0cbdbdfce2525334f to your computer and use it in GitHub Desktop.
Save djspiewak/978d73d12396f2d0cbdbdfce2525334f to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
OWNER=$1
REPO=$2
# get the list of projects from the rest API; it's just a pain due to pagination
# curl https://bintray.com/api/v1/repos/$OWNER/$REPO/packages | jq -r .[].name
for p in project1 project2 projct3 project4; do
echo "Attempting to fetch everything from $p..." >&2
for v in $(jfrog bt ps $OWNER/$REPO/$p | jq -r '.versions[]'); do
echo "...version = $v" >&2
jfrog bt dlv $OWNER/$REPO/$p/$v
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment