Skip to content

Instantly share code, notes, and snippets.

@chunkydotdev
Created March 17, 2023 12:17
Show Gist options
  • Save chunkydotdev/df7043f81bd77551e7a1cc55582e04d6 to your computer and use it in GitHub Desktop.
Save chunkydotdev/df7043f81bd77551e7a1cc55582e04d6 to your computer and use it in GitHub Desktop.
Polls the local git-repository for changes and updates if any are found
cd /home/dev/bunny-game-api
[ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | \
sed 's/\// /g') | cut -f1) ] && echo up to date || (git pull && docker compose up -d --build api database)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment