1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00

Linux: Fixes #5568: Adds 'sort' to pre-release version list (#5588)

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)
This commit is contained in:
WestfalenYeti 2021-10-22 16:21:39 +02:00 committed by GitHub
parent 375214a11f
commit a75eba16a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ fi
# Get the latest version to download # Get the latest version to download
if [[ "$INCLUDE_PRE_RELEASE" == true ]]; then 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 else
RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": ?"v\K.*?(?=")') RELEASE_VERSION=$(wget -qO - "https://api.github.com/repos/laurent22/joplin/releases/latest" | grep -Po '"tag_name": ?"v\K.*?(?=")')
fi fi