From 2a6b830b5834bd7e71d13245ec7d9b715175339b Mon Sep 17 00:00:00 2001 From: Fioren <102145692+FiorenMas@users.noreply.github.com> Date: Wed, 21 Jun 2023 11:41:05 +0700 Subject: [PATCH] Update utils.sh --- src/build/utils.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/build/utils.sh b/src/build/utils.sh index 18bc5e0..974e586 100644 --- a/src/build/utils.sh +++ b/src/build/utils.sh @@ -6,7 +6,6 @@ checker() { curl -sL https://api.github.com/repos/$1/releases/latest > json.txt latest_version=$(jq -r '.name' json.txt) -echo $latest_version > latest-version.txt curl -sL "https://api.github.com/repos/$repository/releases/latest" | jq -r '.assets[] | select(.name == "'$2'-version.txt") | .browser_download_url' | xargs curl -sLO cur_version=$(cat $2-version.txt) if [ "$latest_version" = "$cur_version" ]; then @@ -14,8 +13,8 @@ if [ "$latest_version" = "$cur_version" ]; then exit 0 else echo "New patch, building..." - rm -f ./$2-version.txt ./json.txt - mv latest-version.txt $2-version.txt + rm -f ./json.txt + echo $latest_version > $2-version.txt fi }