I am working on an application for a client. The client will also be developing the app after I finish the project, so I need to make it easy for them to do so. I have been using CoffeeScripts to write my JavaScript and then I compile them when I push them to my personal build server with an Ant script.
The Ant script calls coffee -c js/*.coffee which compiles all of the coffee files down to JS files with the same name. I would like to do that same command in an SVN pre-commit hook. I know that changing files with SVN hooks is a bad thing, but I assume that since I am not actually changing any files, but instead creating new ones, that this isn’t classified as the big bad no-no that people claim.
I am not familiar with SVN at all (I usually use Git) and everything that I can find talks about python scripts and a tool called svnlook, but nothing actually explains it.
Honestly, I don’t like your idea. svn commit is not intended to push compiled java scripts to some server.
What if your client would need to push the same java scripts to other server?
It’s better you’ll svn commit to do the job its intended to.
To solve you problem you could provide a publish script which will do:
The publish script of course should be in svn too 🙂