From eeef3c72e807a0fd27ad2217376aa1f52bc7d864 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Wed, 5 Aug 2020 10:20:22 -0700 Subject: [PATCH] PR feedback --- src/CopyToLatest/CopyToLatest.csproj | 2 +- src/core-sdk-tasks/CopyBlobsToLatest.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CopyToLatest/CopyToLatest.csproj b/src/CopyToLatest/CopyToLatest.csproj index 0af7950d0..a61ea4a61 100644 --- a/src/CopyToLatest/CopyToLatest.csproj +++ b/src/CopyToLatest/CopyToLatest.csproj @@ -3,7 +3,7 @@ $(CoreSdkTargetFramework) true false - $(SourceBranch.Replace('refs/heads/', '').Replace('internal/', '')) + $(SourceBranch.Replace('refs/heads/', '')) diff --git a/src/core-sdk-tasks/CopyBlobsToLatest.cs b/src/core-sdk-tasks/CopyBlobsToLatest.cs index 734898a73..a62000ba7 100644 --- a/src/core-sdk-tasks/CopyBlobsToLatest.cs +++ b/src/core-sdk-tasks/CopyBlobsToLatest.cs @@ -64,6 +64,11 @@ namespace Microsoft.DotNet.Cli.Build public override bool Execute() { + if (!(Channel.Equals("master") || Channel.Equals("main") || Channel.StartsWith("release"))) + { + return true; // Skip copy to latest, we don't want to publish to arbitrary places + } + string targetFolder = $"{AzurePublisher.Product.Sdk}/{Channel}"; string targetVersionFile = $"{targetFolder}/{CommitHash}";