Skip to content

Commit

Permalink
Change list-all order. See asdf-vm/asdf#61
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Perez committed Jun 17, 2016
1 parent be6b278 commit 9b09791
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/list-all
Expand Up @@ -7,6 +7,11 @@ if [ -n "$OAUTH_TOKEN" ]; then
fi
cmd="$cmd $releases_path"

sort_cmd='sort'
if sort --help | grep -q -- '-V'; then
sort_cmd='sort -V'
fi

# Fetch all tag names, and get only second column. Then remove all unnecesary characters.
versions=$(eval $cmd | grep -oE "tag_name\": \".{1,15}\"," | sed 's/tag_name\": \"v//;s/\",//' | sort -r)
versions=$(eval $cmd | grep -oE "tag_name\": \".{1,15}\"," | sed 's/tag_name\": \"v//;s/\",//' | $sort_cmd)
echo $versions

0 comments on commit 9b09791

Please sign in to comment.