Skip to content

Commit

Permalink
Publish as .NET Core Global Tool
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Nov 11, 2018
1 parent 5b55d9b commit 0fdac1b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ Task("Pack-Nuget")
MSBuildSettings = parameters.MSBuildSettings
};

// GitVersionCore & GitVersionTask
// GitVersionCore, GitVersionTask, & global tool
DotNetCorePack("./src/GitVersionCore", settings);
DotNetCorePack("./src/GitVersionTask", settings);
DotNetCorePack("./src/GitVersionExe/GitVersion.Tool.csproj", settings);
});

Task("Pack-Chocolatey")
Expand Down
3 changes: 2 additions & 1 deletion build/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class BuildParameters
Packages = BuildPackages.GetPackages(
Paths.Directories.NugetRoot,
Version.SemVersion,
new [] { "GitVersion.CommandLine.DotNetCore", "GitVersion.CommandLine", "GitVersionCore", "GitVersionTask" },
new [] { "GitVersion.CommandLine.DotNetCore", "GitVersion.CommandLine", "GitVersionCore", "GitVersionTask", "GitVersion.Tool" },
new [] { "GitVersion.Portable" });

var files = Paths.Files;
Expand All @@ -113,6 +113,7 @@ public class BuildParameters
["GitVersion.CommandLine.DotNetCore"] = Paths.Directories.ArtifactsBinNetCore,
["GitVersion.CommandLine"] = Paths.Directories.ArtifactsBinFullFxCmdline,
["GitVersion.Portable"] = Paths.Directories.ArtifactsBinFullFxPortable,
["GitVersion.Tool"] = Paths.Directories.ArtifactsBinNetCore,
};

Credentials = BuildCredentials.GetCredentials(context);
Expand Down
6 changes: 6 additions & 0 deletions src/GitVersion.sln
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerBase", "DockerBase",
Docker\Mono\DockerBase\readme = Docker\Mono\DockerBase\readme
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitVersion.Tool", "GitVersionExe\GitVersion.Tool.csproj", "{929263FD-5CD2-42E1-BF3D-E0C1B0320DA4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -99,6 +101,10 @@ Global
{F7AC0E71-3E9A-4F6D-B986-E004825A48E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7AC0E71-3E9A-4F6D-B986-E004825A48E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7AC0E71-3E9A-4F6D-B986-E004825A48E1}.Release|Any CPU.Build.0 = Release|Any CPU
{929263FD-5CD2-42E1-BF3D-E0C1B0320DA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{929263FD-5CD2-42E1-BF3D-E0C1B0320DA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{929263FD-5CD2-42E1-BF3D-E0C1B0320DA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{929263FD-5CD2-42E1-BF3D-E0C1B0320DA4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
5 changes: 5 additions & 0 deletions src/GitVersionExe/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
</PropertyGroup>
</Project>
11 changes: 11 additions & 0 deletions src/GitVersionExe/GitVersion.Tool.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
<Import Project="GitVersionExe.csproj" />

<PropertyGroup>
<PackAsTool>true</PackAsTool>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<ToolCommandName>dotnet-gitversion</ToolCommandName>
<PackageId>GitVersion.Tool</PackageId>
</PropertyGroup>

</Project>

0 comments on commit 0fdac1b

Please sign in to comment.