From 931331c33a7bddf3509db6aed91e5d3961a0b08b Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 4 Oct 2018 10:37:28 +0100 Subject: [PATCH] fix logic for pushing nuget package --- build.cake | 2 +- parameters.cake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.cake b/build.cake index 49c7b04039..0b356ec9bd 100644 --- a/build.cake +++ b/build.cake @@ -101,7 +101,7 @@ Task("Pack") }); Task("Push") - //.WithCriteria((context, parameters) => parameters.PushNuGet) + .WithCriteria((context, parameters) => parameters.PushNuGet) .Does(parameters => { var apiKey = EnvironmentVariable(parameters.IsNugetRelease ? "NUGET_API_KEY" : "MYGET_API_KEY"); diff --git a/parameters.cake b/parameters.cake index 5cecf21fac..4c5332741d 100644 --- a/parameters.cake +++ b/parameters.cake @@ -29,13 +29,13 @@ public class Parameters Version += "-build" + context.EnvironmentVariable("BUILD_BUILDNUMBER").Replace(".",""); NuGetPushBranch = "master"; - NuGetPushRepoName = "AvaloniaUI/Avalonia.Native"; + NuGetPushRepoName = "https://github.com/AvaloniaUI/Avalonia.Native"; - var repoName = context.EnvironmentVariable("APPVEYOR_REPO_NAME"); - var repoBranch = context.EnvironmentVariable("APPVEYOR_REPO_BRANCH"); + var repoName = context.EnvironmentVariable("BUILD_REPOSITORY_URI"); + var repoBranch = context.EnvironmentVariable("BUILD_SOURCEBRANCHNAME"); var repoTag = context.EnvironmentVariable("APPVEYOR_REPO_TAG"); var repoTagName = context.EnvironmentVariable("APPVEYOR_REPO_TAG_NAME"); - var pullRequestTitle = context.EnvironmentVariable("APPVEYOR_PULL_REQUEST_TITLE"); + var pullRequestTitle = context.EnvironmentVariable("SYSTEM_PULLREQUEST_SOURCEBRANCH"); if (pullRequestTitle == null && string.Compare(repoName, NuGetPushRepoName, StringComparison.OrdinalIgnoreCase) == 0