From 0f965c8ecacebfc869ea4434e2a57a22a03f4a74 Mon Sep 17 00:00:00 2001 From: "C. Augusto Proiete" Date: Wed, 25 Nov 2020 21:57:48 -0400 Subject: [PATCH] Update MinVerAliases usage examples --- src/Cake.MinVer/MinVerAliases.cs | 171 ++++++++++++++++++++++--------- 1 file changed, 121 insertions(+), 50 deletions(-) diff --git a/src/Cake.MinVer/MinVerAliases.cs b/src/Cake.MinVer/MinVerAliases.cs index fc19d3d..64fab8f 100644 --- a/src/Cake.MinVer/MinVerAliases.cs +++ b/src/Cake.MinVer/MinVerAliases.cs @@ -18,7 +18,15 @@ public static class MinVerAliases /// /// /// /// /// @@ -43,43 +51,73 @@ public static MinVerVersion MinVer(this ICakeContext context) /// Increment the major version (e.g. 'dotnet minver --auto-increment major') /// /// settings.WithAutoIncrement(MinVerAutoIncrement.Major)); + /// var buildVersion = MinVer(settings => settings.WithAutoIncrement(MinVerAutoIncrement.Major)); + /// Information($"Version: {buildVersion.Version}"); + /// // ... /// ]]> /// /// Set the build metadata (e.g. 'dotnet minver --build-metadata abcdefg') /// /// settings.WithBuildMetadata("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') /// /// settings.WithDefaultPreReleasePhase("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') /// /// settings.WithMinimumMajorMinor("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') /// /// settings.WithRepo(@"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') /// /// settings.WithTagPrefix("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') + /// + /// settings.WithPreferGlobalTool()); + /// Information($"Version: {buildVersion.Version}"); + /// // ... + /// ]]> + /// + /// Disable the automatic fallback to global tool (or local tool) in case of errors + /// + /// settings.WithNoFallback()); + /// Information($"Version: {buildVersion.Version}"); + /// // ... /// ]]> /// /// Set the verbosity (e.g. 'dotnet minver --verbosity trace') /// /// settings.WithVerbosity(MinVerVerbosity.Trace)); + /// var buildVersion = MinVer(settings => settings.WithVerbosity(MinVerVerbosity.Trace)); + /// Information($"Version: {buildVersion.Version}"); + /// // ... /// ]]> /// /// @@ -111,85 +149,118 @@ public static MinVerVersion MinVer(this ICakeContext context, ActionIncrement the major version (e.g. 'dotnet minver --auto-increment major') /// /// /// /// Set the build metadata (e.g. 'dotnet minver --build-metadata abcdefg') /// /// /// /// Set the default pre-release phase (e.g. 'dotnet minver --default-pre-release-phase preview') /// /// /// /// Set the minimum major and minor version (e.g. 'dotnet minver --minimum-major-minor 2.5') /// /// /// /// Set the working directory for MinVer to use (e.g. 'dotnet minver --repo C:\MyProject') /// /// /// /// Set the tag prefix (e.g. 'dotnet minver --tag-prefix v') /// /// + /// + /// Run MinVer as a global tool (e.g. 'minver'), instead of local tool (e.g. 'dotnet minver') + /// + /// + /// + /// Disable the automatic fallback to global tool (or local tool) in case of errors + /// + /// /// /// Set the verbosity (e.g. 'dotnet minver --verbosity trace') /// /// /// ///