Skip to content

Commit

Permalink
Update Serilog.Sinks.RichTextBox build process to use Cake v2.0.0 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete authored Dec 6, 2021
1 parent 8ada8d1 commit 1dfbd46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "1.3.0",
"version": "2.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
22 changes: 11 additions & 11 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#addin "nuget:?package=Cake.MinVer&version=1.0.1"
#addin "nuget:?package=Cake.Args&version=1.0.1"
#addin "nuget:?package=Cake.MinVer&version=2.0.0"
#addin "nuget:?package=Cake.Args&version=2.0.0"

var target = ArgumentOrDefault<string>("target") ?? "pack";
var buildVersion = MinVer(s => s.WithTagPrefix("v").WithDefaultPreReleasePhase("preview"));
Expand All @@ -15,7 +15,7 @@ Task("restore")
.IsDependentOn("clean")
.Does(() =>
{
DotNetCoreRestore("./serilog-sinks-richtextbox.sln", new DotNetCoreRestoreSettings
DotNetRestore("./serilog-sinks-richtextbox.sln", new DotNetRestoreSettings
{
LockedMode = true,
});
Expand All @@ -25,12 +25,12 @@ Task("build")
.IsDependentOn("restore")
.DoesForEach(new[] { "Debug", "Release" }, (configuration) =>
{
DotNetCoreBuild("./serilog-sinks-richtextbox.sln", new DotNetCoreBuildSettings
DotNetBuild("./serilog-sinks-richtextbox.sln", new DotNetBuildSettings
{
Configuration = configuration,
NoRestore = true,
NoIncremental = false,
MSBuildSettings = new DotNetCoreMSBuildSettings
MSBuildSettings = new DotNetMSBuildSettings
{
Version = buildVersion.Version,
AssemblyVersion = buildVersion.AssemblyVersion,
Expand All @@ -44,7 +44,7 @@ Task("test")
.IsDependentOn("build")
.Does(() =>
{
var settings = new DotNetCoreTestSettings
var settings = new DotNetTestSettings
{
Configuration = "Release",
NoRestore = true,
Expand All @@ -54,7 +54,7 @@ Task("test")
var projectFiles = GetFiles("./test/**/*.csproj");
foreach (var file in projectFiles)
{
DotNetCoreTest(file.FullPath, settings);
DotNetTest(file.FullPath, settings);
}
});

Expand All @@ -64,13 +64,13 @@ Task("pack")
{
var releaseNotes = $"https://github.com/serilog-contrib/serilog-sinks-richtextbox/releases/tag/v{buildVersion.Version}";
DotNetCorePack("./src/Serilog.Sinks.RichTextBox.Wpf/Serilog.Sinks.RichTextBox.Wpf.csproj", new DotNetCorePackSettings
DotNetPack("./src/Serilog.Sinks.RichTextBox.Wpf/Serilog.Sinks.RichTextBox.Wpf.csproj", new DotNetPackSettings
{
Configuration = "Release",
NoRestore = true,
NoBuild = true,
OutputDirectory = "./artifact/nuget",
MSBuildSettings = new DotNetCoreMSBuildSettings
MSBuildSettings = new DotNetMSBuildSettings
{
Version = buildVersion.Version,
PackageReleaseNotes = releaseNotes,
Expand All @@ -96,15 +96,15 @@ Task("push")
return;
}
var nugetPushSettings = new DotNetCoreNuGetPushSettings
var nugetPushSettings = new DotNetNuGetPushSettings
{
Source = url,
ApiKey = apiKey,
};
foreach (var nugetPackageFile in GetFiles("./artifact/nuget/*.nupkg"))
{
DotNetCoreNuGetPush(nugetPackageFile.FullPath, nugetPushSettings);
DotNetNuGetPush(nugetPackageFile.FullPath, nugetPushSettings);
}
});

Expand Down

0 comments on commit 1dfbd46

Please sign in to comment.