This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.MinVer.
Summary
Run the MinVer dotnet tool using the settings returned by a configurator.
- Assembly
- Cake
.MinVer .dll - Namespace
- Cake
.MinVer - Containing Type
- MinVerAliases
Syntax
public static MinVerVersion MinVer(this ICakeContext context, Action<MinVerSettings> configurator)
Examples
Increment the major version (e.g. 'dotnet minver --auto-increment major')
var buildVersion = MinVer(settings => settings.WithAutoIncrement(MinVerAutoIncrement.Major));
Information($"Version: {buildVersion.Version}");
// ...
Set the build metadata (e.g. 'dotnet minver --build-metadata abcdefg')
var buildVersion = MinVer(settings => settings.WithBuildMetadata("abcdefg"));
Information($"Version: {buildVersion.Version}");
// ...
Set the default pre-release phase (e.g. 'dotnet minver --default-pre-release-phase preview')
var buildVersion = MinVer(settings => settings.WithDefaultPreReleasePhase("preview"));
Information($"Version: {buildVersion.Version}");
// ...
Set the minimum major and minor version (e.g. 'dotnet minver --minimum-major-minor 2.5')
var buildVersion = MinVer(settings => settings.WithMinimumMajorMinor("2.5"));
Information($"Version: {buildVersion.Version}");
// ...
Set the working directory for MinVer to use (e.g. 'dotnet minver --repo C:\MyProject')
var buildVersion = MinVer(settings => settings.WithRepo(@"C:\MyProject"));
Information($"Version: {buildVersion.Version}");
// ...
Set the tag prefix (e.g. 'dotnet minver --tag-prefix v')
var buildVersion = MinVer(settings => settings.WithTagPrefix("v"));
Information($"Version: {buildVersion.Version}");
// ...
Run MinVer as a global tool (e.g. 'minver'), instead of local tool (e.g. 'dotnet minver')
var buildVersion = MinVer(settings => settings.WithPreferGlobalTool());
Information($"Version: {buildVersion.Version}");
// ...
Disable the automatic fallback to global tool (or local tool) in case of errors
var buildVersion = MinVer(settings => settings.WithNoFallback());
Information($"Version: {buildVersion.Version}");
// ...
Set the verbosity (e.g. 'dotnet minver --verbosity trace')
var buildVersion = MinVer(settings => settings.WithVerbosity(MinVerVerbosity.Trace));
Information($"Version: {buildVersion.Version}");
// ...
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
configurator | Action |
The settings configurator. |
Return Value
Type | Description |
---|---|
MinVerVersion |