Skip to content

Commit

Permalink
Merge pull request #13 from adamralph/msbuild
Browse files Browse the repository at this point in the history
add CLI
  • Loading branch information
adamralph authored Oct 21, 2018
2 parents a513e64 + dd1fdb0 commit 2dd82d0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
17 changes: 17 additions & 0 deletions MinVer.Cli/MinVer.Cli.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>latest</LangVersion>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="2.6.2" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MinVer\MinVer.csproj" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions MinVer.Cli/Program.cs
Original file line number Diff line number Diff line change
@@ -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]));
}
}
}
6 changes: 6 additions & 0 deletions MinVer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2dd82d0

Please sign in to comment.