Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build on commit with subversion

Simple question. I use Visual studio and I've just installed subversion, how can i force the project to be build with msbuild, and if successfully build commit it else warn the user. I would use TortoiseSVN or VisualSVN or AnkhSVN (whatever it's called) if they have the ability to force build on commit built-in (I know that this is not their usage, I know they are just used as just GUI for committing to SVN) I would like to know if any of these tools can be used to do this extra thing.

To wrap up I am just searching for a painless way to build before commit for subversion.

like image 457
SMeyers Avatar asked Dec 02 '22 08:12

SMeyers


2 Answers

Take a look at TeamCity's "pre-tested commit" a.k.a "delayed commit" a.k.a "private build" feature.

In a nutshell, you "commit" to TeamCity, TeamCity verifies your build and commits to the real repository only if the build passes. If not, you're told so. The advantage here is that your trunk is never broken. You can go here to read more about it https://confluence.jetbrains.com/display/TCDL/Pre-Tested+(Delayed)+Commit

like image 116
Mauricio Scheffer Avatar answered Jan 04 '23 06:01

Mauricio Scheffer


TortoiseSVN has client-side hook scripts which you could use. For example, you could write a script which does the build and only returns true if the build was successful. Then add that script as a pre-commit hook.

like image 44
Stefan Avatar answered Jan 04 '23 08:01

Stefan