From 59508c691ceba8eb3a05e562714648d0a24b93b6 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Wed, 13 Dec 2023 20:10:04 +0100 Subject: [PATCH] Fix offline update detection issue --- bin/updatechecker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/updatechecker b/bin/updatechecker index d93ba081..33727871 100755 --- a/bin/updatechecker +++ b/bin/updatechecker @@ -4,10 +4,11 @@ export "COLOR=31" export "COLOR_REGULAR=\e[0;${COLOR}m" export "COLOR_BOLD=\e[1;${COLOR}m" export "COLOR_RESET=\e[0m" +export "COMMIT=$(env PAGER= git log -n 1 --pretty=format:\"%H\")" export "LATEST_COMMIT=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.id')" export "LATEST_COMMIT_MESSAGE=$(curl -sX 'GET' 'https://git.staropensource.de/api/v1/repos/JeremyStarTM/punktdateien/branches/develop' -H 'accept: application/json'|jq --monochrome-output '.commit.message'|sed 's/\\n//g')" -if [ "$(env PAGER= git log -n 1 --pretty=format:\"%H\")" == "$LATEST_COMMIT" ]; then +if [ "$COMMIT" == "$LATEST_COMMIT" ] || [ -n "$COMMIT" ]; then export "UPDATE=false" else export "UPDATE=true"