From 5bb5c188c4fc811f808f223dc060410d743c3517 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 31 Oct 2019 17:45:07 -0400 Subject: [PATCH] pantheon.updateScript: always use github api Unfortunately elementary has suddenly decided to add ${version}-debian tags into the mix which ls-remote will always sort last. I believe these tags point to the deb-packaging branches in the repo's which we certainly don't ever want to use as they contain no source. --- pkgs/desktops/pantheon/update.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/desktops/pantheon/update.sh b/pkgs/desktops/pantheon/update.sh index 9bbbe260034..8d002fe47c2 100755 --- a/pkgs/desktops/pantheon/update.sh +++ b/pkgs/desktops/pantheon/update.sh @@ -114,13 +114,7 @@ EOF function get_latest_tag ( ) { repo_name="$1" - # Using github release api because sorting this repo just doesn't work because of old git sillyness - # Also too lazy to care to adapt `git ls-remote` command to work with it - if [ $repo_name == "switchboard-plug-pantheon-shell" ]; then - curl --silent --show-error --fail -X GET "https://api.github.com/repos/elementary/$repo_name/releases/latest" | jq -r '.tag_name' - else - git ls-remote --tags --sort="v:refname" "https://github.com/elementary/$repo_name" | tail -n1 | sed 's/.*\///; s/\^{}//' - fi + curl --silent --show-error --fail -X GET "https://api.github.com/repos/elementary/$repo_name/releases/latest" | jq -r '.tag_name' } #