fix: handle git fetch/pull failure

- continue if `git fetch` or `git pull` fails
This commit is contained in:
Sebastian Mark 2023-12-18 22:17:29 +01:00
parent 208eed8048
commit 77a3ae1ed6

4
dc-ops
View file

@ -32,13 +32,13 @@ for LINE in $STACKLIST; do
cd "$STACKDIR" || continue
# fetch from repo and check for new commits
git fetch --quiet
git fetch --quiet || continue
if [[ $(git rev-parse HEAD) == $(git rev-parse "@{u}") ]]; then
msg "no changes - skipping"
continue
fi
# pull new commits and run docker compose
git pull
git pull || continue
docker compose --file "${COMPOSEFILE:=docker-compose.yml}" up --build --detach --remove-orphans
done