From 957c085e1243ec0af5bc45d38691c74e2ba91ad8 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Sun, 4 Jun 2023 14:26:50 +0600 Subject: [PATCH] feat(installer): get latest version from Github API --- scripts/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index b4977b5e8..52526f95c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,7 +8,10 @@ ICON_PATH=/usr/share/icons/spotube/spotube-logo.png BIN_SYMLINK_PATH=/usr/bin/spotube TEMP_DIR=/tmp/spotube-installer -VERSION="2.7.1" + +# get latest version from github api +VERSION=$(curl --silent "https://api.github.com/repos/KRTirtho/spotube/releases/latest" \ + | grep -Po '"tag_name": "\K.*?(?=")') function spotube_help(){ # available flags are -v or --version to specify what version to download