Gitversion: Add IsTagged to output

Created on 13 Jun 2016  Â·  9Comments  Â·  Source: GitTools/GitVersion

Knowing if we are building a tag is useful for a number of reasons including triggering a deployment etc.

In #1052 it was asked for the actual tag as well. So lets add IsTagged and GitCommitTag (or something similar)

stale

Most helpful comment

@gep13 the GitDescribe(DirectoryPath)​ method will give you most recent tag.

All 9 comments

@JakeGinnivan can you confirm what you mean by output? This information is available depending on which CI provider you are using. For example, we do this here:

https://github.com/cake-build/cake/blob/develop/build/parameters.cake#L63

for appveyor.

Yeah, I am using VSTS which Cake doesn't support. Id like it in GitVersion so I can grab the variable even if not using cake

@JakeGinnivan Even if you have this information available in a variable in a build definition, how do you trigger a deployment in VSTS based on this (with the current feature set)? I don't think there's a way currently to pass variable from build to deployment. At least it wasn't last time I asked MSFT about it. But certainly would be useful for different kind of things

@JakeGinnivan said...
I am using VSTS which Cake doesn't support

Would happily accept a PR to support that Build System :-)

@JakeGinnivan could you get what you wanted using the Cake.Git addin? https://github.com/WCOMAB/Cake_Git

@devlead does the above include information about the current tag?

@gep13 the GitDescribe(DirectoryPath)​ method will give you most recent tag.

It is more that I don't need to get this from Cake, I can just add it to the version info. I think it's a useful feature for GitVersion, even if it's available in Cake

I agree with @JakeGinnivan that this is metadata that is useful in GitVersion, even though it's available in Cake. It's information consumers of (just) GitVersion will find useful too, I'm sure. :+1:

@JakeGinnivan @asbjornu sorry, I think I started commenting on this issue incorrectly. When @JakeGinnivan posted this, he had also posted on two issues on the Cake repo, and I had assumed that this issue was created in the Cake repo as well, which is what confused me, and I was wondering why it was being asked for. Now that I understand what you guys are talking about, this makes total sense. Sorry for the confusion.

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings