Skip to content

Commit

Permalink
Merge pull request #7 from odair-pedro/feature/version
Browse files Browse the repository at this point in the history
Feature/version
  • Loading branch information
odair-pedro committed Jun 1, 2020
2 parents c4992bb + 3e8d117 commit 6747221
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
16 changes: 14 additions & 2 deletions Evolve.Migrations.Helper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ public static class Program
{
public static void Main(string[] args)
{
if (args.Contains("--version"))
{
PrintHeaderMessage();
return;
}

if (!ValidateArguments(args))
{
return;
Expand Down Expand Up @@ -44,8 +50,8 @@ private static bool ValidateArguments(IReadOnlyList<string> args)
{
if (args.Count == 0 || args[0] == "--help")
{
Console.WriteLine("Evolve Migrations Helper\r\n");
Console.WriteLine($"Usage: {Assembly.GetExecutingAssembly().GetName().Name} [command] [options]\r\n");
PrintHeaderMessage();
Console.WriteLine($"\r\nUsage: {Assembly.GetExecutingAssembly().GetName().Name} [command] [options]\r\n");
Console.WriteLine("Commands:");
Console.WriteLine($" {"add-dataset".PadRight(20, ' ')} Add a new migration file (on path: \"./datasets\")");
Console.WriteLine($" {"add-migration".PadRight(20, ' ')} Add a new migration file (on path: \"./migrations\")\r\n");
Expand Down Expand Up @@ -110,6 +116,12 @@ private static string GetFileSeparator(IReadOnlyList<string> args)
}
}

private static void PrintHeaderMessage()
{
Console.WriteLine("Evolve Migrations Helper");
Console.WriteLine($"Version: {Assembly.GetExecutingAssembly().GetName().Version}");
}

private static void PrintHelpMessage()
{
Console.WriteLine($"Run '{Assembly.GetExecutingAssembly().GetName().Name} --help' for usage.");
Expand Down
5 changes: 0 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
version: '1.0.{build}'
image:
# - Visual Studio 2019
- Ubuntu
branches:
only:
- master
init:
# Good practise, because Windows line endings are different from Unix/Linux ones
# - cmd: git config --global core.autocrlf true
- sh: git config --global core.autocrlf true
install:
# Install repo specific stuff here
before_build:
# Display .NET Core version
# - cmd: dotnet --version
- sh: dotnet --version
# Display minimal restore text
# - cmd: dotnet restore ./Evolve.Migrations.Helper/Evolve.Migrations.Helper.csproj
- sh: dotnet restore ./Evolve.Migrations.Helper/Evolve.Migrations.Helper.csproj
build_script:
# output will be in ./src/bin/debug/netcoreapp1.1/publish
# - cmd: dotnet publish -c Release ./Evolve.Migrations.Helper/Evolve.Migrations.Helper.csproj -f netcoreapp3.1 -r win-x64 --no-self-contained
- sh: dotnet publish -c Release ./Evolve.Migrations.Helper/Evolve.Migrations.Helper.csproj -f netcoreapp3.1 -r win-x64 --no-self-contained
- sh: dotnet publish -c Release ./Evolve.Migrations.Helper/Evolve.Migrations.Helper.csproj -f netcoreapp3.1 -r linux-x64 --no-self-contained
after_build:
Expand Down

0 comments on commit 6747221

Please sign in to comment.