Fix offline update detection issue
This commit is contained in:
parent
1aa3978309
commit
59508c691c
1 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue