Skip to content

Commit

Permalink
Remove .NET Framework tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed May 5, 2024
1 parent 4120574 commit 6c8ed7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
3 changes: 0 additions & 3 deletions Cake.Wyam.Recipe/Content/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static class BuildParameters
public static string WebBaseEditUrl { get; private set; }
public static string MasterBranchName { get; private set; }
public static string DevelopBranchName { get; private set; }
public static bool IsRunningOnDotNetCore { get; private set; }

public static IDictionary<string, object> WyamSettings
{
Expand Down Expand Up @@ -134,7 +133,6 @@ public static class BuildParameters
context.Information("WebBaseEditUrl: {0}", WebBaseEditUrl);
context.Information("MasterBranchName: {0}", MasterBranchName);
context.Information("DevelopBranchName: {0}", DevelopBranchName);
context.Information("IsRunningOnDotNetCore: {0}", IsRunningOnDotNetCore);
}

public static void SetParameters(
Expand Down Expand Up @@ -194,7 +192,6 @@ public static class BuildParameters

MasterBranchName = masterBranchName;
DevelopBranchName = developBranchName;
IsRunningOnDotNetCore = context.Environment.Runtime.IsCoreClr;

Target = context.Argument("target", "Default");
Configuration = context.Argument("configuration", "Release");
Expand Down
7 changes: 0 additions & 7 deletions Cake.Wyam.Recipe/Content/toolsettings.cake
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,15 @@ public static class ToolSettings
SetToolPreprocessorDirectives();
}

public static string KuduSyncTool { get; private set; }
public static string WyamTool { get; private set; }

public static string WyamGlobalTool { get; private set; }
public static string KuduSyncGlobalTool { get; private set; }

public static void SetToolPreprocessorDirectives(
string kuduSyncTool = "#tool nuget:?package=KuduSync.NET&version=1.5.3",
string wyamTool = "#tool nuget:?package=Wyam&version=2.2.9",
string wyamGlobalTool = "#tool dotnet:?package=Wyam.Tool&version=2.2.9",
// This is using an unofficial build of kudusync so that we can have a .Net Global tool version. This was generated from this PR: https://github.com/projectkudu/KuduSync.NET/pull/27
string kuduSyncGlobalTool = "#tool dotnet:https://pkgs.dev.azure.com/cake-contrib/Home/_packaging/addins/nuget/v3/index.json?package=KuduSync.Tool&version=1.5.4-g13cb5857b6"
)
{
KuduSyncTool = kuduSyncTool;
WyamTool = wyamTool;
WyamGlobalTool = wyamGlobalTool;
KuduSyncGlobalTool = kuduSyncGlobalTool;
}
Expand Down
6 changes: 3 additions & 3 deletions Cake.Wyam.Recipe/Content/wyam.cake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BuildParameters.Tasks.CleanDocumentationTask = Task("Clean-Documentation")

BuildParameters.Tasks.BuildDocumentationTask = Task("Build-Documentation")
.IsDependentOn("Clean-Documentation")
.Does(() => RequireTool(BuildParameters.IsRunningOnDotNetCore ? ToolSettings.WyamGlobalTool : ToolSettings.WyamTool, () => {
.Does(() => RequireTool(ToolSettings.WyamGlobalTool, () => {
Wyam(new WyamSettings
{
Recipe = BuildParameters.WyamRecipe,
Expand All @@ -33,7 +33,7 @@ BuildParameters.Tasks.PublishDocumentationTask = Task("Publish-Documentation")
.IsDependentOn("Build-Documentation")
.WithCriteria(() => BuildParameters.ShouldPublishDocumentation)
.WithCriteria(() => DirectoryExists(BuildParameters.WyamRootDirectoryPath))
.Does(() => RequireTool(BuildParameters.IsRunningOnDotNetCore ? ToolSettings.KuduSyncGlobalTool : ToolSettings.KuduSyncTool, () => {
.Does(() => RequireTool(ToolSettings.KuduSyncGlobalTool, () => {
if(BuildParameters.CanUseWyam)
{
var sourceCommit = GitLogTip("./");
Expand Down Expand Up @@ -100,7 +100,7 @@ BuildParameters.Tasks.PurgeCloudflareCacheTask = Task("Purge-Cloudflare-Cache")

BuildParameters.Tasks.PreviewDocumentationTask = Task("Preview-Documentation")
.WithCriteria(() => DirectoryExists(BuildParameters.WyamRootDirectoryPath))
.Does(() => RequireTool(BuildParameters.IsRunningOnDotNetCore ? ToolSettings.WyamGlobalTool : ToolSettings.WyamTool, () => {
.Does(() => RequireTool(ToolSettings.WyamGlobalTool, () => {
Information(BuildParameters.WebLinkRoot);
var settings = new WyamSettings
{
Expand Down

0 comments on commit 6c8ed7f

Please sign in to comment.