GitVersion
GitVersion copied to clipboard
[Feature Request] additional commandline option to set environment variables and modify default output
Having gitversion set environment variables GITVERSION_[NAME]=value be helpful. gitversion /setenvironmentvariables
Also, would be nice to modify the format of the output. Instead of JSON, using a flatter NAME=value would be helpful. gitversion /output:flat
With flat output, or even json output (although dont know why you'd need it for json), specifying specific variables to output would also be helpful: gitversion /output:flat /variables:FullSemVer and gitversion /output:flat /variables=FullSemVer,MajorMinorPatch
Just spitballing here. Currently having to write a cmd for to parse the json output for FullSemVer and its not pleasant... ;-)
Having gitversion set environment variables
GITVERSION_[NAME]=valuebe helpful.gitversion /setenvironmentvariables
Adding a switch for it doesn't make much sense since GitVersion already does this automatically on build servers. Are you thinking this should be done on local builds as well? If so, the LocalBuild agent could be made to do it.
Also, would be nice to modify the format of the output. Instead of JSON, using a flatter
NAME=valuewould be helpful.gitversion /output:flat
Sounds like something we can plan for with a new CLI in version 7. See #2275.
With flat output, or even json output (although dont know why you'd need it for json), specifying specific variables to output would also be helpful:
gitversion /output:flat /variables:FullSemVerandgitversion /output:flat /variables=FullSemVer,MajorMinorPatch
I don't think we're going to cram this into the already overloaded and at the brink of collapse CLI we have, but please read #2275 and make suggestions given the proposed command-based CLI syntax there. 👍🏼
Just spitballing here. Currently having to write a cmd
forto parse the json output for FullSemVer and its not pleasant... ;-)
I agree!
The new CLI looks like a step in the right direction. I see other issues with ordering of options here, and the new verb-based CLI should make that easier to deal with
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.
We added support in v6-beta1 this https://github.com/GitTools/GitVersion/issues/3400, I guess this can solve your issue.