diff --git a/build.cake b/build.cake index f08299c0f0..fbd915461f 100644 --- a/build.cake +++ b/build.cake @@ -240,71 +240,6 @@ Task("Create-NuGet-Packages-Impl") } }); -Task("Publish-MyGet-Impl") - .WithCriteria((context, data) => !data.Parameters.IsLocalBuild) - .WithCriteria((context, data) => !data.Parameters.IsPullRequest) - .WithCriteria((context, data) => data.Parameters.IsMainRepo) - .WithCriteria((context, data) => data.Parameters.IsMasterBranch) - .WithCriteria((context, data) => data.Parameters.IsMyGetRelease) - .Does(data => -{ - var apiKey = EnvironmentVariable("MYGET_API_KEY"); - if(string.IsNullOrEmpty(apiKey)) - { - throw new InvalidOperationException("Could not resolve MyGet API key."); - } - - var apiUrl = EnvironmentVariable("MYGET_API_URL"); - if(string.IsNullOrEmpty(apiUrl)) - { - throw new InvalidOperationException("Could not resolve MyGet API url."); - } - - foreach(var nupkg in data.Packages.NugetPackages) - { - NuGetPush(nupkg, new NuGetPushSettings { - Source = apiUrl, - ApiKey = apiKey - }); - } -}) -.OnError(exception => -{ - Information("Publish-MyGet Task failed, but continuing with next Task..."); -}); - -Task("Publish-NuGet-Impl") - .WithCriteria((context, data) => !data.Parameters.IsLocalBuild) - .WithCriteria((context, data) => !data.Parameters.IsPullRequest) - .WithCriteria((context, data) => data.Parameters.IsMainRepo) - .WithCriteria((context, data) => data.Parameters.IsNuGetRelease) - .Does(data => -{ - var apiKey = EnvironmentVariable("NUGET_API_KEY"); - if(string.IsNullOrEmpty(apiKey)) - { - throw new InvalidOperationException("Could not resolve NuGet API key."); - } - - var apiUrl = EnvironmentVariable("NUGET_API_URL"); - if(string.IsNullOrEmpty(apiUrl)) - { - throw new InvalidOperationException("Could not resolve NuGet API url."); - } - - foreach(var nupkg in data.Packages.NugetPackages) - { - NuGetPush(nupkg, new NuGetPushSettings { - ApiKey = apiKey, - Source = apiUrl - }); - } -}) -.OnError(exception => -{ - Information("Publish-NuGet Task failed, but continuing with next Task..."); -}); - /////////////////////////////////////////////////////////////////////////////// // TARGETS ///////////////////////////////////////////////////////////////////////////////