Build on commit with subversion

妖精的绣舞 提交于 2020-01-10 09:21:30

问题


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.


回答1:


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




回答2:


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.




回答3:


You could also use CruiseControl, Hudson or another continuous integration tool.

These could run in the background, watch for changes and then build.




回答4:


The method Stefan suggested seems to be potentially the best for you.

However an alternative depending on what your trying to gain, might be to run with some sort of Automated Continuous Integration so every time a commit is made a build / test will be run, then if there are problems it could raise an alert or whatever. Since your using visual studio guessing your using .NET so CruiseControl might be worth a look.




回答5:


Well, you may also educate your co-workers if you are not willing to pay for special tools...




回答6:


I think this might work for you since you use SVN.

In all what you are asking for is like what mausch suggested, a CI server. In that case TeamCity fits the bill.

But perhaps you didnt need all the bells and whistles that came with a CI server. Then SIN might work for you. Check it out if you have time!



来源:https://stackoverflow.com/questions/500944/build-on-commit-with-subversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!