https://github.com/sigmonsays/git-watch
git watch
https://github.com/sigmonsays/git-watch
git go
Last synced: 5 months ago
JSON representation
git watch
- Host: GitHub
- URL: https://github.com/sigmonsays/git-watch
- Owner: sigmonsays
- Created: 2014-09-17T17:03:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T21:56:49.000Z (over 3 years ago)
- Last Synced: 2024-06-21T11:02:25.761Z (about 2 years ago)
- Topics: git, go
- Language: Go
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
git-watch
=============================
watch a git repository for changes and execute update commands
features
=============================
- be generic as possible
- minimal dependencies
- intelligent restart
- if install fails, we do not restart
install/Upgrade
=============================
Install or Upgrade
export GOPATH=$HOME/go
go get -u github.com/sigmonsays/git-watch/cmd/git-watch
pre-compiled binaries
=============================
See http://gobuild.io/github.com/sigmonsays/git-watch/git-watch
quickstart
=============================
Usage:
Usage of git-watch:
-check=30: git check interval
-config="git-watch.yaml": git watch config
an example which rebuilds a docker container when upstream changes are detected. See
the examples directory for more options.
**git-watch.yaml**
checkinterval: 5
localbranch: master
execcmd: make start
updatecmd: make
installcmd: make install
**Makefile**
all:
docker build -t api .
install:
# nothing to do
start:
docker stop api
docker rm api
docker run -i --rm --name api api
Then simply start git-watch in the git checkout directory and it'll begin monitoring it for changes.
If the update command or install command fails, the process will not restart
configuration
=============================