From 4fc0fea072a82c5dd42574726bcc463cedd7c61a Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sun, 16 Aug 2020 17:50:52 -0700 Subject: [PATCH] fix(tools): Use correct hash when automatically updating flatpak version Before v0.2.9 would be sorted below v0.2.12, giving the wrong hash. (cherry picked from commit 1f1cb2f5f9187cc987e2fbdb1957dde34f96c647) --- tools/update-toxcore-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/update-toxcore-version.sh b/tools/update-toxcore-version.sh index 4913c784f..dcd416cde 100755 --- a/tools/update-toxcore-version.sh +++ b/tools/update-toxcore-version.sh @@ -51,7 +51,7 @@ update_osx() { update_flatpak() { cd flatpak - latest_tag_ref=$(git ls-remote --tags https://github.com/toktok/c-toxcore | tail -n1) + latest_tag_ref=$(git ls-remote --tags https://github.com/toktok/c-toxcore | sort -V -k2 | tail -n1) ref_array=($latest_tag_ref) commit_hash=${ref_array[0]} perl -i -0pe "s|(https://github.com/toktok/c-toxcore.*?)$VERSION_PATTERN(.*?)[a-f0-9]{40}|\${1}$@\${2}$commit_hash|gms" io.github.qtox.qTox.json