cake-build / cake-build/cake

Ensure object returned from GitVersion is consistent

Open
#1,128 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
3h 37m
Merged PRs (30d)
21

Description

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](http://stackoverflow.com/questions/38603170/object-returned-from-gitversion-not-consistent/38605556#38605556)

Contributor guide

Open the contributing guide

Research direction

Start with the GitVersion alias and compare its returned object when OutputType is set to GitVersionOutput.BuildServer versus when OutputType is omitted. Use the linked StackOverflow reproduction to confirm the NULL properties, then trace the alias behavior and add or update coverage so the returned object is consistent; if that cannot be fixed, document the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.