Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure object returned from GitVersion is consistent #1128

Open
Jericho opened this issue Jul 27, 2016 · 3 comments
Open

Ensure object returned from GitVersion is consistent #1128

Jericho opened this issue Jul 27, 2016 · 3 comments

Comments

@Jericho
Copy link
Contributor

Jericho commented Jul 27, 2016

I have observed that the object returned by the GitVersion alias is different depending on the OutputType settings property. If set the OutputType to 'GitVersionOutput.BuildServer', GitVersion returns an object where the properties contain NULL but if I omit the OutputType setting, the properties on the returned object are properly initialized.

It was suggested to me to invoke the GitVersion alias twice to work around this issue but I still think the value returned by this alias should be consistent. At the very least, the documentation should be updated to warn people about this behavior.

For more details including sample code to reproduce, see this StackOverflow question

@gep13
Copy link
Member

gep13 commented Jul 27, 2016

@Jericho I agree that we need to do something, however, we have to remember that Cake is simply a wrapper around the underlying tool. If you run gitversion directly using the buildserver option, you won't get any JSON output.

@gep13
Copy link
Member

gep13 commented Jul 28, 2016

@Jericho in all likelihood, we won't be able to do anything with this until we implement a new feature in GitVersion itself: GitTools/GitVersion#983

Once that is done, we will modify the GitVersion alias in Cake to take advantage of the new file that is generated.

@asbjornu
Copy link
Contributor

asbjornu commented Aug 9, 2016

Once implemented, #1030 will make sure that the output from GitVersion is consistent and don't regress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants