From 72e62abd74a1fa6331c2713c3a57aba0fd4636c3 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Sun, 28 Apr 2019 18:01:42 +0300 Subject: [PATCH 1/6] initial support of azure pipelines --- Cake.Recipe/Content/appveyor.cake | 4 +-- Cake.Recipe/Content/azurepipelines.cake | 27 +++++++++++++++++++ Cake.Recipe/Content/buildProvider.cake | 8 +++++- recipe.cake | 35 ++++++++++++++++++++++++- 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 Cake.Recipe/Content/azurepipelines.cake diff --git a/Cake.Recipe/Content/appveyor.cake b/Cake.Recipe/Content/appveyor.cake index c55c9a6d..ca5cd401 100644 --- a/Cake.Recipe/Content/appveyor.cake +++ b/Cake.Recipe/Content/appveyor.cake @@ -108,10 +108,10 @@ public class AppVeyorBuildInfo : IBuildInfo { public AppVeyorBuildInfo(IAppVeyorProvider appVeyor) { - Number = appVeyor.Environment.Build.Number; + Number = appVeyor.Environment.Build.Number.ToString(); } - public int Number { get; } + public string Number { get; } } public class AppVeyorBuildProvider : IBuildProvider diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake new file mode 100644 index 00000000..e6189f3d --- /dev/null +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////// +// BUILD PROVIDER +/////////////////////////////////////////////////////////////////////////////// + +public class AzurePipelinesBuildInfo : IBuildInfo +{ + public AzurePipelinesBuildInfo(ITFBuildProvider tfBuild) + { + Number = tfBuild.Environment.Build.Number; + } + + public string Number { get; } +} + +public class AzurePipelinesBuildProvider : IBuildProvider +{ + public AzurePipelinesBuildProvider(ITFBuildProvider tfBuild) + { + Build = new AzurePipelinesBuildInfo(tfBuild); + } + + public IRepositoryInfo Repository { get; } + + public IPullRequestInfo PullRequest { get; } + + public IBuildInfo Build { get; } +} \ No newline at end of file diff --git a/Cake.Recipe/Content/buildProvider.cake b/Cake.Recipe/Content/buildProvider.cake index 6c00933c..3eb4dce2 100644 --- a/Cake.Recipe/Content/buildProvider.cake +++ b/Cake.Recipe/Content/buildProvider.cake @@ -21,7 +21,7 @@ public interface IPullRequestInfo public interface IBuildInfo { - int Number { get; } + string Number { get; } } public interface IBuildProvider @@ -35,6 +35,12 @@ public interface IBuildProvider public static IBuildProvider GetBuildProvider(ICakeContext context, BuildSystem buildSystem) { + //todo: need to be replaced to `IsRunningOnAzurePipelines || IsRunningOnAzurePipelinesHosted` after update to Cake 0.33.0 + if (buildSystem.IsRunningOnTFS || buildSystem.IsRunningOnVSTS) + { + return new AzurePipelinesBuildProvider(buildSystem.TFBuild); + } + // always fallback to AppVeyor return new AppVeyorBuildProvider(buildSystem.AppVeyor); } \ No newline at end of file diff --git a/recipe.cake b/recipe.cake index 819687ac..69d0d336 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,37 @@ -#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease +// todo: temporarily switch to local sources +//#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease + +#load "Cake.Recipe/Content/addins.cake" +#load "Cake.Recipe/Content/analyzing.cake" +#load "Cake.Recipe/Content/appveyor.cake" +#load "Cake.Recipe/Content/azurepipelines.cake" +#load "Cake.Recipe/Content/build.cake" +#load "Cake.Recipe/Content/buildData.cake" +#load "Cake.Recipe/Content/buildProvider.cake" +#load "Cake.Recipe/Content/chocolatey.cake" +#load "Cake.Recipe/Content/codecov.cake" +#load "Cake.Recipe/Content/configuration.cake" +#load "Cake.Recipe/Content/coveralls.cake" +#load "Cake.Recipe/Content/credentials.cake" +#load "Cake.Recipe/Content/environment.cake" +#load "Cake.Recipe/Content/gitlink.cake" +#load "Cake.Recipe/Content/gitreleasemanager.cake" +#load "Cake.Recipe/Content/gitter.cake" +#load "Cake.Recipe/Content/gitversion.cake" +#load "Cake.Recipe/Content/microsoftteams.cake" +#load "Cake.Recipe/Content/nuget.cake" +#load "Cake.Recipe/Content/packages.cake" +#load "Cake.Recipe/Content/parameters.cake" +#load "Cake.Recipe/Content/paths.cake" +#load "Cake.Recipe/Content/slack.cake" +#load "Cake.Recipe/Content/tasks.cake" +#load "Cake.Recipe/Content/testing.cake" +#load "Cake.Recipe/Content/tools.cake" +#load "Cake.Recipe/Content/toolsettings.cake" +#load "Cake.Recipe/Content/transifex.cake" +#load "Cake.Recipe/Content/twitter.cake" +#load "Cake.Recipe/Content/version.cake" +#load "Cake.Recipe/Content/wyam.cake" Environment.SetVariableNames(); From fe9b0b4f472e6a8e23c1315f0500e5aace334ae0 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Sun, 28 Apr 2019 23:07:49 +0300 Subject: [PATCH 2/6] add remaining implementations of build provider info --- Cake.Recipe/Content/appveyor.cake | 6 ++-- Cake.Recipe/Content/azurepipelines.cake | 45 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/Cake.Recipe/Content/appveyor.cake b/Cake.Recipe/Content/appveyor.cake index ca5cd401..146c85e0 100644 --- a/Cake.Recipe/Content/appveyor.cake +++ b/Cake.Recipe/Content/appveyor.cake @@ -75,7 +75,7 @@ public class AppVeyorTagInfo : ITagInfo public bool IsTag { get; } - public string Name { get; } + public string Name { get; } } public class AppVeyorRepositoryInfo : IRepositoryInfo @@ -101,7 +101,7 @@ public class AppVeyorPullRequestInfo : IPullRequestInfo IsPullRequest = appVeyor.Environment.PullRequest.IsPullRequest; } - public bool IsPullRequest { get; } + public bool IsPullRequest { get; } } public class AppVeyorBuildInfo : IBuildInfo @@ -111,7 +111,7 @@ public class AppVeyorBuildInfo : IBuildInfo Number = appVeyor.Environment.Build.Number.ToString(); } - public string Number { get; } + public string Number { get; } } public class AppVeyorBuildProvider : IBuildProvider diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake index e6189f3d..d22dbfea 100644 --- a/Cake.Recipe/Content/azurepipelines.cake +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -2,6 +2,49 @@ // BUILD PROVIDER /////////////////////////////////////////////////////////////////////////////// +public class AzurePipelinesTagInfo : ITagInfo +{ + public AzurePipelinesTagInfo(ITFBuildProvider tfBuild) + { + // at the moment, there is no ability to know is it tag or not + IsTag = tfBuild.Environment.Repository.Branch.StartsWith("refs/tags/"); + Name = IsTag + ? tfBuild.Environment.Repository.Branch.Substring(10) + : string.Empty; + } + + public bool IsTag { get; } + + public string Name { get; } +} + +public class AzurePipelinesRepositoryInfo : IRepositoryInfo +{ + public AzurePipelinesRepositoryInfo(ITFBuildProvider tfBuild) + { + Branch = tfBuild.Environment.Repository.Branch; + Name = tfBuild.Environment.Repository.RepoName; + Tag = new AzurePipelinesTagInfo(tfBuild); + } + + public string Branch { get; } + + public string Name { get; } + + public ITagInfo Tag { get; } +} + +public class AzurePipelinesPullRequestInfo : IPullRequestInfo +{ + public AzurePipelinesPullRequestInfo(ITFBuildProvider tfBuild) + { + //todo: update to `tfBuild.Environment.PullRequest.IsPullRequest` after upgrade to 0.33.0 + IsPullRequest = false; + } + + public bool IsPullRequest { get; } +} + public class AzurePipelinesBuildInfo : IBuildInfo { public AzurePipelinesBuildInfo(ITFBuildProvider tfBuild) @@ -17,6 +60,8 @@ public class AzurePipelinesBuildProvider : IBuildProvider public AzurePipelinesBuildProvider(ITFBuildProvider tfBuild) { Build = new AzurePipelinesBuildInfo(tfBuild); + PullRequest = new AzurePipelinesPullRequestInfo(tfBuild); + Repository = new AzurePipelinesRepositoryInfo(tfBuild); } public IRepositoryInfo Repository { get; } From 49bbc2b2a596d6b85aae05b8ae13af6d185e8c15 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Thu, 9 May 2019 16:04:53 +0300 Subject: [PATCH 3/6] determine whether it's pull request or not --- Cake.Recipe/Content/azurepipelines.cake | 17 +++++++++++------ Cake.Recipe/Content/buildProvider.cake | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake index d22dbfea..26e1626a 100644 --- a/Cake.Recipe/Content/azurepipelines.cake +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -6,10 +6,11 @@ public class AzurePipelinesTagInfo : ITagInfo { public AzurePipelinesTagInfo(ITFBuildProvider tfBuild) { + const string refTags = "refs/tags/"; // at the moment, there is no ability to know is it tag or not - IsTag = tfBuild.Environment.Repository.Branch.StartsWith("refs/tags/"); + IsTag = tfBuild.Environment.Repository.Branch.StartsWith(refTags); Name = IsTag - ? tfBuild.Environment.Repository.Branch.Substring(10) + ? tfBuild.Environment.Repository.Branch.Substring(refTags.Length) : string.Empty; } @@ -36,10 +37,14 @@ public class AzurePipelinesRepositoryInfo : IRepositoryInfo public class AzurePipelinesPullRequestInfo : IPullRequestInfo { - public AzurePipelinesPullRequestInfo(ITFBuildProvider tfBuild) + public AzurePipelinesPullRequestInfo(ITFBuildProvider tfBuild, ICakeEnvironment environment) { //todo: update to `tfBuild.Environment.PullRequest.IsPullRequest` after upgrade to 0.33.0 - IsPullRequest = false; + var value = environment.GetEnvironmentVariable("SYSTEM_PULLREQUEST_PULLREQUESTID"); + + IsPullRequest = !string.IsNullOrWhiteSpace(value) && int.TryParse(value, out var id) + ? id > 0 + : false; } public bool IsPullRequest { get; } @@ -57,10 +62,10 @@ public class AzurePipelinesBuildInfo : IBuildInfo public class AzurePipelinesBuildProvider : IBuildProvider { - public AzurePipelinesBuildProvider(ITFBuildProvider tfBuild) + public AzurePipelinesBuildProvider(ITFBuildProvider tfBuild, ICakeEnvironment environment) { Build = new AzurePipelinesBuildInfo(tfBuild); - PullRequest = new AzurePipelinesPullRequestInfo(tfBuild); + PullRequest = new AzurePipelinesPullRequestInfo(tfBuild, environment); Repository = new AzurePipelinesRepositoryInfo(tfBuild); } diff --git a/Cake.Recipe/Content/buildProvider.cake b/Cake.Recipe/Content/buildProvider.cake index 3eb4dce2..b420a9b3 100644 --- a/Cake.Recipe/Content/buildProvider.cake +++ b/Cake.Recipe/Content/buildProvider.cake @@ -38,7 +38,7 @@ public static IBuildProvider GetBuildProvider(ICakeContext context, BuildSystem //todo: need to be replaced to `IsRunningOnAzurePipelines || IsRunningOnAzurePipelinesHosted` after update to Cake 0.33.0 if (buildSystem.IsRunningOnTFS || buildSystem.IsRunningOnVSTS) { - return new AzurePipelinesBuildProvider(buildSystem.TFBuild); + return new AzurePipelinesBuildProvider(buildSystem.TFBuild, context.Environment); } // always fallback to AppVeyor From a8bd9b24fab55546e6df72dd8c04a74c34938750 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Thu, 9 May 2019 16:32:41 +0300 Subject: [PATCH 4/6] implement Upload artifact functionality for build providers --- Cake.Recipe/Content/analyzing.cake | 8 ++++---- Cake.Recipe/Content/appveyor.cake | 24 +++++++++--------------- Cake.Recipe/Content/azurepipelines.cake | 9 +++++++++ Cake.Recipe/Content/build.cake | 17 ++++++++++++++++- Cake.Recipe/Content/buildProvider.cake | 2 ++ Cake.Recipe/Content/tasks.cake | 2 +- 6 files changed, 41 insertions(+), 21 deletions(-) diff --git a/Cake.Recipe/Content/analyzing.cake b/Cake.Recipe/Content/analyzing.cake index 8c8417d7..fe0765b4 100644 --- a/Cake.Recipe/Content/analyzing.cake +++ b/Cake.Recipe/Content/analyzing.cake @@ -64,9 +64,9 @@ BuildParameters.Tasks.DupFinderTask = Task("DupFinder") BuildParameters.Paths.Directories.DupFinderTestResults.CombineWithFilePath("dupfinder.xml"), outputHtmlFile); - if(BuildParameters.IsRunningOnAppVeyor && FileExists(outputHtmlFile)) + if(!BuildParameters.IsLocalBuild && FileExists(outputHtmlFile)) { - AppVeyor.UploadArtifact(outputHtmlFile); + BuildParameters.BuildProvider.UploadArtifact(outputHtmlFile); } if(BuildParameters.IsLocalBuild) @@ -114,9 +114,9 @@ BuildParameters.Tasks.InspectCodeTask = Task("CreateIssuesReport") "./", issueReportFile); - if(BuildParameters.IsRunningOnAppVeyor && FileExists(issueReportFile)) + if(!BuildParameters.IsLocalBuild && FileExists(issueReportFile)) { - AppVeyor.UploadArtifact(issueReportFile); + BuildParameters.BuildProvider.UploadArtifact(issueReportFile); } }); diff --git a/Cake.Recipe/Content/appveyor.cake b/Cake.Recipe/Content/appveyor.cake index 146c85e0..139b1181 100644 --- a/Cake.Recipe/Content/appveyor.cake +++ b/Cake.Recipe/Content/appveyor.cake @@ -34,21 +34,6 @@ BuildParameters.Tasks.PrintAppVeyorEnvironmentVariablesTask = Task("Print-AppVey Information("CONFIGURATION: {0}", EnvironmentVariable("CONFIGURATION")); }); -BuildParameters.Tasks.UploadAppVeyorArtifactsTask = Task("Upload-AppVeyor-Artifacts") - .IsDependentOn("Package") - .WithCriteria(() => BuildParameters.IsRunningOnAppVeyor) - .WithCriteria(() => DirectoryExists(BuildParameters.Paths.Directories.NuGetPackages) || DirectoryExists(BuildParameters.Paths.Directories.ChocolateyPackages)) - .Does(() => -{ - // Concatenating FilePathCollections should make sure we get unique FilePaths - foreach(var package in GetFiles(BuildParameters.Paths.Directories.Packages + "/**/*") + - GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/*") + - GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/*")) - { - AppVeyor.UploadArtifact(package); - } -}); - BuildParameters.Tasks.ClearAppVeyorCacheTask = Task("Clear-AppVeyor-Cache") .Does(() => RequireAddin(@"#addin nuget:?package=Cake.AppVeyor&version=3.0.0&loaddependencies=true @@ -121,6 +106,8 @@ public class AppVeyorBuildProvider : IBuildProvider Repository = new AppVeyorRepositoryInfo(appVeyor); PullRequest = new AppVeyorPullRequestInfo(appVeyor); Build = new AppVeyorBuildInfo(appVeyor); + + _appVeyor = appVeyor; } public IRepositoryInfo Repository { get; } @@ -128,4 +115,11 @@ public class AppVeyorBuildProvider : IBuildProvider public IPullRequestInfo PullRequest { get; } public IBuildInfo Build { get; } + + private readonly IAppVeyorProvider _appVeyor; + + public void UploadArtifact(FilePath file) + { + _appVeyor.UploadArtifact(file); + } } \ No newline at end of file diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake index 26e1626a..7dcd3363 100644 --- a/Cake.Recipe/Content/azurepipelines.cake +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -67,6 +67,8 @@ public class AzurePipelinesBuildProvider : IBuildProvider Build = new AzurePipelinesBuildInfo(tfBuild); PullRequest = new AzurePipelinesPullRequestInfo(tfBuild, environment); Repository = new AzurePipelinesRepositoryInfo(tfBuild); + + _tfBuild = tfBuild; } public IRepositoryInfo Repository { get; } @@ -74,4 +76,11 @@ public class AzurePipelinesBuildProvider : IBuildProvider public IPullRequestInfo PullRequest { get; } public IBuildInfo Build { get; } + + private readonly ITFBuildProvider _tfBuild; + + public void UploadArtifact(FilePath file) + { + _tfBuild.Commands.UploadArtifact("artifacts", file); + } } \ No newline at end of file diff --git a/Cake.Recipe/Content/build.cake b/Cake.Recipe/Content/build.cake index f45e9349..05e98bd2 100644 --- a/Cake.Recipe/Content/build.cake +++ b/Cake.Recipe/Content/build.cake @@ -408,8 +408,23 @@ BuildParameters.Tasks.PackageTask = Task("Package") BuildParameters.Tasks.DefaultTask = Task("Default") .IsDependentOn("Package"); +BuildParameters.Tasks.UploadArtifactsTask = Task("Upload-Artifacts") + .IsDependentOn("Package") + .WithCriteria(() => !BuildParameters.IsLocalBuild) + .WithCriteria(() => DirectoryExists(BuildParameters.Paths.Directories.NuGetPackages) || DirectoryExists(BuildParameters.Paths.Directories.ChocolateyPackages)) + .Does(() => +{ + // Concatenating FilePathCollections should make sure we get unique FilePaths + foreach(var package in GetFiles(BuildParameters.Paths.Directories.Packages + "/**/*") + + GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/*") + + GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/*")) + { + BuildParameters.BuildProvider.UploadArtifact(package); + } +}); + BuildParameters.Tasks.AppVeyorTask = Task("AppVeyor") - .IsDependentOn("Upload-AppVeyor-Artifacts") + .IsDependentOn("Upload-Artifacts") .IsDependentOn("Publish-MyGet-Packages") .IsDependentOn("Publish-Nuget-Packages") .IsDependentOn("Publish-GitHub-Release") diff --git a/Cake.Recipe/Content/buildProvider.cake b/Cake.Recipe/Content/buildProvider.cake index b420a9b3..bfa897f3 100644 --- a/Cake.Recipe/Content/buildProvider.cake +++ b/Cake.Recipe/Content/buildProvider.cake @@ -31,6 +31,8 @@ public interface IBuildProvider IPullRequestInfo PullRequest { get; } IBuildInfo Build { get; } + + void UploadArtifact(FilePath file); } public static IBuildProvider GetBuildProvider(ICakeContext context, BuildSystem buildSystem) diff --git a/Cake.Recipe/Content/tasks.cake b/Cake.Recipe/Content/tasks.cake index fd94075a..9a110329 100644 --- a/Cake.Recipe/Content/tasks.cake +++ b/Cake.Recipe/Content/tasks.cake @@ -4,7 +4,7 @@ public class BuildTasks public CakeTaskBuilder InspectCodeTask { get; set; } public CakeTaskBuilder AnalyzeTask { get; set; } public CakeTaskBuilder PrintAppVeyorEnvironmentVariablesTask { get; set; } - public CakeTaskBuilder UploadAppVeyorArtifactsTask { get; set; } + public CakeTaskBuilder UploadArtifactsTask { get; set; } public CakeTaskBuilder ClearAppVeyorCacheTask { get; set; } public CakeTaskBuilder ShowInfoTask { get; set; } public CakeTaskBuilder CleanTask { get; set; } From 1f5cf6a5820ab8c29952b03e59f153c085ed07e6 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Thu, 9 May 2019 16:44:02 +0300 Subject: [PATCH 5/6] specify artifactaname for azure pipelines build provider --- Cake.Recipe/Content/azurepipelines.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cake.Recipe/Content/azurepipelines.cake b/Cake.Recipe/Content/azurepipelines.cake index 7dcd3363..a7d49365 100644 --- a/Cake.Recipe/Content/azurepipelines.cake +++ b/Cake.Recipe/Content/azurepipelines.cake @@ -81,6 +81,6 @@ public class AzurePipelinesBuildProvider : IBuildProvider public void UploadArtifact(FilePath file) { - _tfBuild.Commands.UploadArtifact("artifacts", file); + _tfBuild.Commands.UploadArtifact("artifacts", file, file.GetFilename().FullPath); } } \ No newline at end of file From e0ccd37f57dddc1986b15d75db8dd9f0e2a65995 Mon Sep 17 00:00:00 2001 From: Vadim Hatsura Date: Thu, 9 May 2019 16:49:15 +0300 Subject: [PATCH 6/6] remove temp local references --- recipe.cake | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/recipe.cake b/recipe.cake index 69d0d336..819687ac 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,37 +1,4 @@ -// todo: temporarily switch to local sources -//#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease - -#load "Cake.Recipe/Content/addins.cake" -#load "Cake.Recipe/Content/analyzing.cake" -#load "Cake.Recipe/Content/appveyor.cake" -#load "Cake.Recipe/Content/azurepipelines.cake" -#load "Cake.Recipe/Content/build.cake" -#load "Cake.Recipe/Content/buildData.cake" -#load "Cake.Recipe/Content/buildProvider.cake" -#load "Cake.Recipe/Content/chocolatey.cake" -#load "Cake.Recipe/Content/codecov.cake" -#load "Cake.Recipe/Content/configuration.cake" -#load "Cake.Recipe/Content/coveralls.cake" -#load "Cake.Recipe/Content/credentials.cake" -#load "Cake.Recipe/Content/environment.cake" -#load "Cake.Recipe/Content/gitlink.cake" -#load "Cake.Recipe/Content/gitreleasemanager.cake" -#load "Cake.Recipe/Content/gitter.cake" -#load "Cake.Recipe/Content/gitversion.cake" -#load "Cake.Recipe/Content/microsoftteams.cake" -#load "Cake.Recipe/Content/nuget.cake" -#load "Cake.Recipe/Content/packages.cake" -#load "Cake.Recipe/Content/parameters.cake" -#load "Cake.Recipe/Content/paths.cake" -#load "Cake.Recipe/Content/slack.cake" -#load "Cake.Recipe/Content/tasks.cake" -#load "Cake.Recipe/Content/testing.cake" -#load "Cake.Recipe/Content/tools.cake" -#load "Cake.Recipe/Content/toolsettings.cake" -#load "Cake.Recipe/Content/transifex.cake" -#load "Cake.Recipe/Content/twitter.cake" -#load "Cake.Recipe/Content/version.cake" -#load "Cake.Recipe/Content/wyam.cake" +#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease Environment.SetVariableNames();