go-autobuild builds your go project every time a go source file has been added, modified or deleted.
go-autobuild is not the first application that builds your go applications every time a file changes. For example there are
- go-gb
- gowatch
- buildwatch
- gobuild
- goautotest
- GoMon
- go-bldbot
- and many others ...
Most of them use fsnotify which has the drawback of not (natively) supporting recursive watchers and operating system limitations for the number of watched files.
Even though I must admit that adding recursive support to fsnotify isn't that hard and the limitition for the maxiumum number of watches files and folders on some operating system isn't likely to be a problem for small go applications I chose to build my autobuild tool upon go-fswatch - a filesystem watcher which does not depend on inotify.
Just start go-autobuild in your project folder and it will build your project every time you change a file:
cd ~/dev/gocode/src/<your-project-name>
go-autobuild
- 2013-10-06: Please pull the latest version of andreaskoch/go-fswatch and rebuild. The go-fswatch library applied the skip-expression on folders which broke the the folder recursion (see: https://github.com/andreaskoch/go-fswatch/commit/212d924aad87e4061194f741184195a8f511a4ba).
If you have an idea how to make this little tool better please send me a message or a pull request.
All contributions are welcome.