Pull a repo, check for any changes, restart a separate process. Assumes target process is python but could run anything if you wanted. Arguably a bit of a bodge for environments where changes cannot be pushed, such as behind a VPN. Does not check that your changes are good, just whether they have happened.
Change variables in config.py for your setup. Configure git to use SSH that does not need a passcode. Set up the remote origin on your local git directory before you run.
Designed for Ubuntu Linux. pullcheck
should be set to autorun on boot, not your target program.
- run
git pull
ongit_url
- if
git_pull_change
isTrue
then stop target program - Start target program
- loop every
pull_wait
seconds until the end of the universe or the server dies, whichever comes first
To get this up and running on your local machine as-is,
git clone git@github.com:jamesgeddes/sandbox.git
cd ..
git clone git@github.com:jamesgeddes/pullcheck.git
- Edit
config.git_local_path