I have been trying to find a plugin to get the current tag on my branch so I can use it as part of my build as a parameter to msbuild. We want to use this tag to version dlls.
You can get Git tag using git commands in your build script. For example, see this link, the currently used revision is specified by the build.vcs.number build parameter.
Hi Dario,
You can get Git tag using git commands in your build script. For example, see this link, the currently used revision is specified by the build.vcs.number build parameter.
Thanks! So I can use git describe to set the variable and pass it thorught the messaging system to set the complete dll version.
last_tagSomething like
$last_tag = git describe --exact-match %env.BUILD_VCS_NUMBER%
gitTag
value='{last_tag}']and I can use gitTag as part of my build script
Is this correct?
Yes, it will work (except this line
last_tag) in case of agent side checkout.