Integrating MsBuild with Git
Im looking for way to integrate MsBuild scripts with Git source control. The first thing I would like to make is to create Task that creates Git Tag at sources.
MsBuild Comunity Tasks looks like doesn't have any support for Git. Any ideas how to co开发者_开发问答nnect these two is much appreciated.
Depending what you are doing and if you want to keep it simple, just use the Exec
task to call the appropriate git command, like git tag
You can otherwise look at extending MSBuild and write tasks that make use of these git commands
or you can make use of GitSharp
For anyone coming here a few years after the original question, you can now find git task support in MSBuild.Community.Tasks
https://github.com/loresoft/msbuildtasks/tree/master/Source/MSBuild.Community.Tasks/Git
I would use TeamCity to have a couple of different branches to build off of. Let one of them be a release candidate branch and have TeamCity auto-tag it for you. This should allow you to not bother with MSBuild tinkering.
Hope this helps.
精彩评论