Skip to content

Use environment variables in minver-cli #450

Closed
@adamralph

Description

@adamralph
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.

Activity

added this to the 2.4.0 milestone on Dec 21, 2020
adamralph

adamralph commented on Dec 21, 2020

@adamralph
OwnerAuthor

Released in 2.4.0-beta.1.

@augustoproiete please give it a try.

augustoproiete

augustoproiete commented on Dec 21, 2020

@augustoproiete

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @augustoproiete@adamralph

      Issue actions

        Use environment variables in minver-cli · Issue #450 · adamralph/minver