GitVersion Tool: Rename verbosity values to match GitVersion values
See original GitHub issueFollow-up from #3281
Background
The Verbosity
argument of GitVersion changed in more recent releases and the existing values in Cake’s enumeration no longer match the accepted values by GitVersion.
Proposal
Update/rename the values in the Cake enumeration to match the exact values values expected in newer versions of GitVersion. This would be a breaking change in the Cake’s API and would be included in a future major version of Cake.
Cake | Rename to | GitVersion |
---|---|---|
None |
➡️ | Quiet |
Error |
➡️ | Minimal |
Warn |
➡️ | Normal |
Info |
➡️ | Verbose |
Debug |
➡️ | Diagnostic |
Workaround
The current workaround is to use ArgumentCustomization
to pass in custom values:
var result = GitVersion(new GitVersionSettings
{
// ...
ArgumentCustomization = args => args
.Append("-verbosity")
.Append("Quiet")
});
Related:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Configuration
The special value Inherit means that GitVersion should find the parent branch (i.e. the branch where the current branch was branched from), and...
Read more >Git - git-config Documentation
Regular expression matching is currently case-sensitive and done against a canonicalized version of the key in which section and variable names are lowercased, ......
Read more >Cake v2.0.0 released
#3282 GitVersion Tool: Rename verbosity values to match GitVersion values. #3222 Add Xamarin.iOS platform targets to MSBuildSettings ...
Read more >GitVersion not respecting tag-prefix
I was misunderstanding the use of the settings. I've found a work around for my specific use case that I'm going to reply...
Read more >bcftools(1) Manual Page
This option controls how overlapping records are determined: set to pos or 0 if the VCF record has to have POS inside a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been resolved by #3321 and will be released with Cake v2.0
Hey @joshuacookdev thanks for your interest in helping with this one!
For context, GitVersion is a separate open-source project that is not part of Cake (it’s an external tool that can be executed from Cake), and what we’re doing is just adding some “helper” methods to make it easy for Cake users to execute the GitVersion tool.
It’s important to have a separation between
GitVersionVerbosity
andVerbosity
because both GitVersion and Cake might modify its verbosity options at any point in the future as they are independent projects.We want users of GitVersion to be able to leverage all the options that GitVersion offers without having to compromise on the options offered by Cake, and we want to reserve the right to modify Cake’s verbosity options without worrying about it having side-effects to GitVersion (or other tools).
When you use GitVersion from Cake, you can explicitly set the verbosity level, e.g.:
That means
GitVersionVerbosity
should always reflect all the options that GitVersion understands.The options of GitVersion for Verbosity now happen to match with the options that Cake uses for
Verbosity
but that was not the case before and we can’t guarantee it will continue that way in the future.If tomorrow they (GitVersion) add a new option, say,
Information
, all we have to do is to updateGitVersionVerbosity
and users can start leveraging this new option, without us having to change theVerbosity
enumeration of Cake.Likewise, if
Cake
adds a new option that GitVersion doesn’t understand, the execution of the tool would fail.Does that make sense?