Skip to content

Commit

Permalink
fix: 🐛 repo reset order
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Nov 23, 2023
1 parent 4700e27 commit 64c1d30
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@ wrkDir="/home/discord/droidscord"

cd "$wrkDir" || exit 1

if ! git reset --hard "$targetBranch"; then
echo "👹 Oops! Failed to clear stage"

exit 1
fi

if ! git checkout "$targetBranch"; then
echo "👹 Oops! Failed to switch branch"

exit 1
fi

if ! git pull origin "$targetBranch"; then
echo "👹 Oops! Failed to pull latest"
if ! git fetch origin || ! git reset --hard "origin/$targetBranch"; then
echo "👹 Oops! Failed to clear stage"

exit 1
fi

git clean -f

if ! docker compose ps --format "{{.Service}} {{.State}}" | grep 'llm_indexer running' || ! docker compose ps --format "{{.Service}} {{.State}}" | grep 'discordjs-bot'; then
echo "⚠️ Warrning: Docker compose stack is down"
echo "🤖 Should start compose stack, be patient..."
Expand Down

0 comments on commit 64c1d30

Please sign in to comment.