fix: handle git fetch/pull failure
- continue if `git fetch` or `git pull` fails
This commit is contained in:
parent
208eed8048
commit
77a3ae1ed6
1 changed files with 2 additions and 2 deletions
4
dc-ops
4
dc-ops
|
@ -32,13 +32,13 @@ for LINE in $STACKLIST; do
|
||||||
cd "$STACKDIR" || continue
|
cd "$STACKDIR" || continue
|
||||||
|
|
||||||
# fetch from repo and check for new commits
|
# 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
|
if [[ $(git rev-parse HEAD) == $(git rev-parse "@{u}") ]]; then
|
||||||
msg "no changes - skipping"
|
msg "no changes - skipping"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# pull new commits and run docker compose
|
# pull new commits and run docker compose
|
||||||
git pull
|
git pull || continue
|
||||||
docker compose --file "${COMPOSEFILE:=docker-compose.yml}" up --build --detach --remove-orphans
|
docker compose --file "${COMPOSEFILE:=docker-compose.yml}" up --build --detach --remove-orphans
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue