lib: sort releases in version order
If sorted in alphabetical order v1.21.11 will be lower than v1.21.8
This commit is contained in:
parent
8260f4ac6f
commit
4bff22bc37
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ function full_version() {
|
|||
local owner=$2
|
||||
|
||||
if [[ $version =~ ^[0-9]+\.[0-9]+$ ]] ; then
|
||||
full_version=$(curl -sS https://codeberg.org/api/v1/repos/$owner/forgejo/releases | jq -r '.[] | .tag_name | select(startswith("v'$version'"))' | sort -r | head -1)
|
||||
full_version=$(curl -sS https://codeberg.org/api/v1/repos/$owner/forgejo/releases | jq -r '.[] | .tag_name | select(startswith("v'$version'"))' | sort --reverse --version-sort | head -1)
|
||||
echo ${full_version#v}
|
||||
else
|
||||
echo $version
|
||||
|
|
Loading…
Add table
Reference in a new issue