diff --git a/MinVer.Cli/MinVer.Cli.csproj b/MinVer.Cli/MinVer.Cli.csproj new file mode 100644 index 00000000..d9309a7a --- /dev/null +++ b/MinVer.Cli/MinVer.Cli.csproj @@ -0,0 +1,17 @@ + + + + latest + Exe + netcoreapp2.1 + + + + + + + + + + + diff --git a/MinVer.Cli/Program.cs b/MinVer.Cli/Program.cs new file mode 100644 index 00000000..2361ce4a --- /dev/null +++ b/MinVer.Cli/Program.cs @@ -0,0 +1,17 @@ +namespace MinVer.Cli +{ + using System; + + class Program + { + static void Main(string[] args) + { + if (args.Length == 0) + { + throw new ArgumentException("Path not specified."); + } + + Console.WriteLine(Versioner.GetVersion(args[0])); + } + } +} diff --git a/MinVer.sln b/MinVer.sln index 359f0f6a..8bf39bb7 100644 --- a/MinVer.sln +++ b/MinVer.sln @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MinVer", "MinVer\MinVer.csp EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Targets", "targets\Targets.csproj", "{0F266E8B-E818-41A8-B93C-9E80E9446AC6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinVer.Cli", "MinVer.Cli\MinVer.Cli.csproj", "{EE9A19AA-0EDC-446F-8FD8-78A066E27B71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {0F266E8B-E818-41A8-B93C-9E80E9446AC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F266E8B-E818-41A8-B93C-9E80E9446AC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F266E8B-E818-41A8-B93C-9E80E9446AC6}.Release|Any CPU.Build.0 = Release|Any CPU + {EE9A19AA-0EDC-446F-8FD8-78A066E27B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE9A19AA-0EDC-446F-8FD8-78A066E27B71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE9A19AA-0EDC-446F-8FD8-78A066E27B71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE9A19AA-0EDC-446F-8FD8-78A066E27B71}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE