Skip to content

Commit

Permalink
Linux: Fixes #5568: Adds 'sort' to pre-release version list (#5588)
Browse files Browse the repository at this point in the history
Added a 'sort by version number' to the handling of the version list when prerelease parameter ist set. 
(Assumes the latest pre-release version has a highest version number)
  • Loading branch information
westfalenyeti authored Oct 22, 2021
1 parent 375214a commit a75eba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Joplin_install_and_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fi

# Get the latest version to download
if [[ "$INCLUDE_PRE_RELEASE" == true ]]; then
RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases" | grep -Po '"tag_name": ?"v\K.*?(?=")' | head -1)
RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases" | grep -Po '"tag_name": ?"v\K.*?(?=")' | sort -rV | head -1)
else
RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": ?"v\K.*?(?=")')
fi
Expand Down

0 comments on commit a75eba1

Please sign in to comment.