Created
February 4, 2021 07:57
-
-
Save davidyuk/963529ba417025e4a7647fcea7c3c3de to your computer and use it in GitHub Desktop.
Simple rebuild and run on the latest commit changing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/folder-with-git-repository | |
while true | |
do | |
git fetch | |
git reset --hard origin/master | |
commit=$(git log -n 1) | |
if [ "$lastCommit" != "$commit" ] | |
then | |
lastCommit=$commit | |
./build.sh | |
pkill process-name | |
./run.sh & | |
fi | |
sleep 60 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment