Skip to content

Commit

Permalink
fix: replace use of tac command
Browse files Browse the repository at this point in the history
  • Loading branch information
particledecay committed Jan 13, 2021
1 parent bb78f46 commit 9091b96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ then
CURL="$CURL -H 'Authorization: token $OAUTH_TOKEN'"
fi

$CURL -fL "https://api.github.com/repos/$repository/releases" | grep tag_name | sed 's/"tag_name": //g;s/"//g;s/,//g' | sed -e 's/v//g' -e '/1.6.0/q' | tac | xargs
function sort_versions() {
LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n
}

versions=$($CURL -fL "https://api.github.com/repos/$repository/releases" | grep tag_name | sed -e 's/"tag_name": //g;s/"//g;s/,//g' -e 's/v//g' -e '/1.6.0/q')
echo "$versions" | sort_versions | xargs

0 comments on commit 9091b96

Please sign in to comment.