1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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 1f1cb2f5f9)
This commit is contained in:
Anthony Bilinski 2020-08-16 17:50:52 -07:00
parent 5932e9332b
commit 4fc0fea072
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -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