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

Add MinVerVersionOverride property to simplify usage of both MinVer and minver-cli in the same build #180

Closed
adamralph opened this issue Dec 21, 2018 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@adamralph
Copy link
Owner

adamralph commented Dec 21, 2018

Currently if you want to use both MinVer and minver-cli in the same build, which at least https://github.com/SQLStreamStore/SQLStreamStore.HAL is doing, you have to ensure that the inputs to each of them is identical so that they produce the same version, which could be a little error prone.

With the introduction of this new property, you can run the CLI, and use the version it produces for everything. Just set the MINVERVERSIONOVERRIDE environment variable to the version that comes out of the CLI and the build targets in the MinVer package will just use that value instead of invoking the versioning logic a second time:

// using SimpleExec;
var version = Read("minver");

Environment.SetEnvironmentVariable(
    "MINVERVERSIONOVERRIDE", version, EnvironmentVariableTarget.Process);

Run("dotnet", "pack");

// do other stuff with the version
@adamralph adamralph added the enhancement New feature or request label Dec 21, 2018
@adamralph adamralph added this to the 1.0.0 milestone Dec 21, 2018
@adamralph adamralph self-assigned this Dec 21, 2018
@adamralph
Copy link
Owner Author

/cc @thefringeninja

@adamralph adamralph removed their assignment Jul 21, 2024
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

No branches or pull requests

1 participant