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

Use environment variables in minver-cli #450

Closed
adamralph opened this issue Dec 21, 2020 · 2 comments · Fixed by #437
Closed

Use environment variables in minver-cli #450

adamralph opened this issue Dec 21, 2020 · 2 comments · Fixed by #437
Labels
enhancement New feature or request
Milestone

Comments

@adamralph
Copy link
Owner

Thanks to @augustoproiete for raising #423 for MinVerBuildMetadata, which led to this more general enhancement.

The MinVer package accepts options as environment variables. This is standard .NET SDK behaviour: all environment variables are propagated as MSBuild properties.

With this enhancement, the minver-cli package does the same thing.

There is one exception: MinVerSkip. This option effectively switches off the MinVer package, which means none of the output properties will be set, which means the SDK will use whatever version is set via a Version property, whether that is explicitly done for a project, or implicitly done by the SDK as a default value. There is no good equivalent for minver-cli. If the command line were "switched off", then the equivalent behaviour would be to return no value. If a user wants to "switch off" the minver-cli package, then they can observe MinVerSkip themselves and provide an alternate version string in that scenario.

@adamralph adamralph added the enhancement New feature or request label Dec 21, 2020
@adamralph adamralph added this to the 2.4.0 milestone Dec 21, 2020
@adamralph
Copy link
Owner Author

Released in 2.4.0-beta.1.

@augustoproiete please give it a try.

@adamralph adamralph mentioned this issue Dec 21, 2020
14 tasks
@augustoproiete
Copy link

augustoproiete commented Dec 21, 2020

Cheers @adamralph! I will take it for a spin!

Update: Test results

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

Successfully merging a pull request may close this issue.

2 participants