From 6c79775a77f6fb770f14eba795158f67ab2f0d32 Mon Sep 17 00:00:00 2001 From: Sergey Tregub Date: Thu, 19 Sep 2019 10:39:25 +0300 Subject: [PATCH] Fix a console output problem caused by breaking changes in an external command line parser --- README.md | 1 + src/dbup-cli/README.md | 2 +- src/dbup-cli/ToolEngine.cs | 8 +++++++- src/dbup-cli/dbup-cli.csproj | 12 +++++++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ae932df..d6b14c4 100644 --- a/README.md +++ b/README.md @@ -52,5 +52,6 @@ The tool has almost all the features the DbUp has, but without a single line of |Date|Version|Description| |-|-|-| +|2019-08-27|1.1.2|Minor fixes |2019-04-11|1.1.0|PostgreSQL support |2019-03-25|1.0.1|Initial version (DbUp 4.2) diff --git a/src/dbup-cli/README.md b/src/dbup-cli/README.md index 308e6fd..784b431 100644 --- a/src/dbup-cli/README.md +++ b/src/dbup-cli/README.md @@ -1,7 +1,7 @@ * Update a version * Open a console * Go to the `src\dbup-cli` folder -* Run `dotnet pack -c Release /p:NuspecFile=dbup-cli.nuspec` +* Run `dotnet pack -c Release` * Run `dotnet tool install --global --add-source ./nupkg dbup-cli` Uninstall: diff --git a/src/dbup-cli/ToolEngine.cs b/src/dbup-cli/ToolEngine.cs index ed6ec52..ffe024b 100644 --- a/src/dbup-cli/ToolEngine.cs +++ b/src/dbup-cli/ToolEngine.cs @@ -16,7 +16,13 @@ public class ToolEngine IEnvironment Environment { get; } IUpgradeLog Logger { get; } Option ConnectionFactory { get; } - Parser ArgsParser = new Parser(cfg => cfg.CaseInsensitiveEnumValues = true); + Parser ArgsParser = new Parser(cfg => + { + cfg.CaseInsensitiveEnumValues = true; + cfg.AutoHelp = true; + cfg.AutoVersion = true; + cfg.HelpWriter = Console.Out; + }); public ToolEngine(IEnvironment environment, IUpgradeLog logger, Option connectionFactory) { diff --git a/src/dbup-cli/dbup-cli.csproj b/src/dbup-cli/dbup-cli.csproj index 8663db9..ea0ff57 100644 --- a/src/dbup-cli/dbup-cli.csproj +++ b/src/dbup-cli/dbup-cli.csproj @@ -10,7 +10,7 @@ latest DbUp Command Line Interface Sergey Tregub - 1.1.0 + 1.1.2 https://github.com/drwatson1/dbup-cli Copyright (c) 2019 Sergey Tregub @@ -20,11 +20,13 @@ true dbup ./nupkg - 1.1.0 PostgreSQL support + 1.1.2 Minor fixes +1.1.0 PostgreSQL support 1.0.1 Initial version (DbUp 4.2) DbUp Command Line Interface Command line tool, that can be installed as a .Net global tool, that helps you to deploy changes to SQL Server databases. It tracks which SQL scripts have been run already, and runs the change scripts that are needed to get your database up to date. - https://github.com/drwatson1/dbup-cli/blob/master/LICENSE + + LICENSE @@ -33,6 +35,10 @@ + + True + +