| CARVIEW |
Localbuilder on GitHub
One of several little projects I have up and running on GitHub at present is LocalBuilder. It’s a pretty simple little script which watches for changes in a given directory and when they occur runs a given command. I knocked it together to use to trigger the running of a test suite each time I save files in a project. It’s written in Python but you could use it to run commands in any language you like.
It’s all pretty simple Python really and is hopefully reasonably commented and tested so if you’re interested you can follow along with the code. If you just want to use the damn thing then:
./localbuilder --path /path/to/watch --command /command/to/execute
It turns out Ruby has a much nicer tool to do this and more in autotest, part of the ZenTest suite of testing tools. I’m finding more and more very nice bits of code written in Ruby of late, but that’s probably a whole different blog post.
Related articles
- CSS Test on GitHub - I upload the work I’ve done so far on ...
- I Love GitHub Two - I’d been meaning to write a quick article about ...
- A Simple Python Jabber Bot - I’ve been knocking together various little instant messaging bots ...
- Local Continuous Integration with Integrity - Integrity is ace. I’m a huge fan of working ...
- Spyder - Stuart at work has been playing with a nice Python ...
- Django Performance Tip - Profile Your Filters - I’ve been doing some performance profiling of this here ...
- Simulating Rails like Environments in Django - I was always a fan of Rail environments and as ...
- Google App Engine PyUnit Test Runner - I’m starting to play around with using App Engine ...
- Using Python and Stompserver to Get Started With Message Queues - Message Queues are cool. It’s official. Now, banks and ...
Comments
Good stuff Gareth.
Someone did something similar a couple of years back that called Nose on directory change:
https://jeffwinkler.net/2006/04/27/keeping-your-nose-green/
Simon Scarfe - 15th January 2009
Leave a comments