From f6d0aa52edd8b87f72f13c83a0448e99eda554ac Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 28 Jan 2023 15:02:17 +0100 Subject: [PATCH 1/2] Revert "chore: fix latest install to cater for existing users who installed using '-s latest' (#3513)" This reverts commit 52e2f9338e5f77e7ce4c89589524c7f3907c9bf0. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a3f4cf4cea89..68bd5380dad6 100755 --- a/install.sh +++ b/install.sh @@ -317,7 +317,7 @@ http_copy() { github_release() { owner_repo=$1 version=$2 - if [ -z "$version" ] || [ "$version" = "latest" ]; then + if [ -z "$version" ]; then giturl="https://api.github.com/repos/${owner_repo}/releases/latest" else giturl="https://api.github.com/repos/${owner_repo}/releases/tags/${version}" From 9617056de4812cf26e60bd7b89b7bc257c657e21 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 28 Jan 2023 15:02:19 +0100 Subject: [PATCH 2/2] Revert "chore: fix install.sh to point at releases API (#3510)" This reverts commit d57156ec228b712ccd429367482771179e3fa050. --- install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) mode change 100755 => 100644 install.sh diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index 68bd5380dad6..291c47ac5df4 --- a/install.sh +++ b/install.sh @@ -317,14 +317,11 @@ http_copy() { github_release() { owner_repo=$1 version=$2 - if [ -z "$version" ]; then - giturl="https://api.github.com/repos/${owner_repo}/releases/latest" - else - giturl="https://api.github.com/repos/${owner_repo}/releases/tags/${version}" - fi + test -z "$version" && version="latest" + giturl="https://github.com/${owner_repo}/releases/${version}" json=$(http_copy "$giturl" "Accept:application/json") test -z "$json" && return 1 - version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name": "//' | sed 's/".*//') + version=$(echo "$json" | tr -s '\n' ' ' | sed 's/.*"tag_name":"//' | sed 's/".*//') test -z "$version" && return 1 echo "$version" }