Skip to content

Commit

Permalink
updates to build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed May 15, 2019
1 parent ab71acc commit 1e37ba5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
27 changes: 23 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Task("Copy-Files")
CopyFileToDirectory("./LICENSE", coreFxDir);
CopyFileToDirectory($"./src/GitVersionExe/bin/{parameters.Configuration}/{parameters.CoreFxVersion}/GitVersion.xml", coreFxDir);
// .NET 4.0
// .NET Framework
DotNetCorePublish("./src/GitVersionExe/GitVersionExe.csproj", new DotNetCorePublishSettings
{
Framework = parameters.FullFxVersion,
Expand All @@ -234,6 +234,25 @@ Task("Copy-Files")
MSBuildSettings = parameters.MSBuildSettings
});
DotNetCorePublish("./src/GitVersion.MsBuild/GitVersion.MsBuild.csproj", new DotNetCorePublishSettings
{
Framework = parameters.FullFxVersion,
NoBuild = true,
NoRestore = true,
Configuration = parameters.Configuration,
MSBuildSettings = parameters.MSBuildSettings
});
// .NET Core
DotNetCorePublish("./src/GitVersion.MsBuild/GitVersion.MsBuild.csproj", new DotNetCorePublishSettings
{
Framework = parameters.CoreFxVersion,
NoBuild = true,
NoRestore = true,
Configuration = parameters.Configuration,
MSBuildSettings = parameters.MSBuildSettings
});
var ilMergeDir = parameters.Paths.Directories.ArtifactsBinFullFxILMerge;
var portableDir = parameters.Paths.Directories.ArtifactsBinFullFxPortable.Combine("tools");
var cmdlineDir = parameters.Paths.Directories.ArtifactsBinFullFxCmdline.Combine("tools");
Expand Down Expand Up @@ -357,9 +376,9 @@ Task("Pack-Nuget")
MSBuildSettings = parameters.MSBuildSettings
};
// GitVersionCore, GitVersionTask, & global tool
// GitVersionCore, GitVersion.MsBuild, & global tool
DotNetCorePack("./src/GitVersionCore", settings);
DotNetCorePack("./src/GitVersionTask", settings);
DotNetCorePack("./src/GitVersion.MsBuild", settings);
DotNetCorePack("./src/GitVersionExe/GitVersion.Tool.csproj", settings);
});

Expand Down Expand Up @@ -393,7 +412,7 @@ Task("Zip-Files")
.IsDependentOn("Copy-Files")
.Does<BuildParameters>((parameters) =>
{
// .NET 4.0
// .NET Framework
var cmdlineDir = parameters.Paths.Directories.ArtifactsBinFullFxCmdline.Combine("tools");
var fullFxFiles = GetFiles(cmdlineDir.FullPath + "/**/*");
Zip(cmdlineDir, parameters.Paths.Files.ZipArtifactPathDesktop, fullFxFiles);
Expand Down
5 changes: 2 additions & 3 deletions build/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public class BuildParameters
Packages = BuildPackages.GetPackages(
Paths.Directories.NugetRoot,
Version.SemVersion,
new [] { "GitVersion.CommandLine.DotNetCore", "GitVersion.CommandLine", "GitVersionCore", "GitVersionTask", "GitVersion.Tool" },
new [] { "GitVersion.CommandLine.DotNetCore", "GitVersion.CommandLine", "GitVersionCore", "GitVersion.MsBuild", "GitVersion.Tool" },
new [] { "GitVersion.Portable" });

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

Credentials = BuildCredentials.GetCredentials(context);
Expand Down
3 changes: 1 addition & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

</PropertyGroup>
<PropertyGroup>
<PackageVersion_LibGit2Sharp>0.26.0</PackageVersion_LibGit2Sharp>
<PackageVersion_LibGit2SharpNativeBinaries>[2.0.267]</PackageVersion_LibGit2SharpNativeBinaries>
<PackageVersion_LibGit2Sharp>0.26.0</PackageVersion_LibGit2Sharp>
<PackageVersion_JetBrainsAnnotations>2019.1.1</PackageVersion_JetBrainsAnnotations>
<PackageVersion_YamlDotNet>6.0.0</PackageVersion_YamlDotNet>
</PropertyGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/GitVersionCore/GitVersionCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="LibGit2Sharp" Version="$(PackageVersion_LibGit2Sharp)" />
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="$(PackageVersion_LibGit2SharpNativeBinaries)" PrivateAssets="contentFiles" />
<PackageReference Include="LibGit2Sharp" Version="$(PackageVersion_LibGit2Sharp)" />
<PackageReference Include="JetBrains.Annotations" Version="$(PackageVersion_JetBrainsAnnotations)"></PackageReference>
<PackageReference Include="YamlDotNet" Version="$(PackageVersion_YamlDotNet)" />
</ItemGroup>
Expand Down

0 comments on commit 1e37ba5

Please sign in to comment.