Change check for update condition
Instead of fetching from remote, it now only compares HEAD from local to HEAD of the current branch on remote
This commit is contained in:
parent
60486b2abd
commit
72e904fb63
@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
if [[ $(git fetch) ]]; then
|
local_head=$(git rev-parse HEAD)
|
||||||
|
upstream_ref=$(git rev-parse --abbrev-ref @{u} | sed 's/\// /')
|
||||||
|
remote_head=$(git ls-remote $upstream_ref | cut -f1)
|
||||||
|
|
||||||
|
if [[ $local_head != $remote_head ]]; then
|
||||||
git pull
|
git pull
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user