Skip to content

Commit

Permalink
Fix a console output problem caused by breaking changes in an externa…
Browse files Browse the repository at this point in the history
…l command line parser
  • Loading branch information
Sergey Tregub committed Sep 19, 2019
1 parent 86148de commit 6c79775
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/dbup-cli/README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
8 changes: 7 additions & 1 deletion src/dbup-cli/ToolEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ public class ToolEngine
IEnvironment Environment { get; }
IUpgradeLog Logger { get; }
Option<IConnectionFactory> 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<IConnectionFactory> connectionFactory)
{
Expand Down
12 changes: 9 additions & 3 deletions src/dbup-cli/dbup-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<LangVersion>latest</LangVersion>
<Product>DbUp Command Line Interface</Product>
<Authors>Sergey Tregub</Authors>
<Version>1.1.0</Version>
<Version>1.1.2</Version>
<RepositoryUrl>https://github.com/drwatson1/dbup-cli</RepositoryUrl>
<Company />
<Copyright>Copyright (c) 2019 Sergey Tregub</Copyright>
Expand All @@ -20,11 +20,13 @@
<PackAsTool>true</PackAsTool>
<ToolCommandName>dbup</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
<PackageReleaseNotes>1.1.0 PostgreSQL support
<PackageReleaseNotes>1.1.2 Minor fixes
1.1.0 PostgreSQL support
1.0.1 Initial version (DbUp 4.2)</PackageReleaseNotes>
<Title>DbUp Command Line Interface</Title>
<Description>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.</Description>
<PackageLicenseUrl>https://github.com/drwatson1/dbup-cli/blob/master/LICENSE</PackageLicenseUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -33,6 +35,10 @@

<ItemGroup>
<None Remove="DefaultOptions\dbup.yml" />
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 6c79775

Please sign in to comment.