开发者

Run tasks after checking out project from svn?

I have a project (this is a maven开发者_开发问答 project) in svn. After the project has been checked out I would like to run some small tasks automatically (eg. some of the subprojects must be build etc). Is it possible to add specific task to svn checkout?


I think (and hope) that feature does not exist. It would be a serious security hole. (Imagine that you checkout an open source code from the internet and it formats your hard drive too.)

A workaround: create a batch file/shell script for your tasks and commit it to the root folder of your project (autorun.sh for example). After checkout you just have to run this script and it runs you tasks.

If the checkout takes too much time you can create an other shell script which checkouts your project and run the aurorun.sh from its root folder. Of course this script have to be on your machine before the checkout somehow.


Rather than [ab]use SVN, use a continuous integration server such as Jenkins. It will check things out of SVN and run build scripts, tests, etc. It can do it every time a commit is made to SVN, or overnight, or whatever you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜