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