PR feedback

This commit is contained in:
Sarah Oslund 2020-08-05 10:20:22 -07:00
parent ace6e859e7
commit eeef3c72e8
2 changed files with 6 additions and 1 deletions

View file

@ -3,7 +3,7 @@
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework> <TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory> <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<Channel>$(SourceBranch.Replace('refs/heads/', '').Replace('internal/', ''))</Channel> <Channel>$(SourceBranch.Replace('refs/heads/', ''))</Channel>
</PropertyGroup> </PropertyGroup>
<Import Project="..\redist\targets\BuildCoreSdkTasks.targets" /> <Import Project="..\redist\targets\BuildCoreSdkTasks.targets" />

View file

@ -64,6 +64,11 @@ namespace Microsoft.DotNet.Cli.Build
public override bool Execute() 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 targetFolder = $"{AzurePublisher.Product.Sdk}/{Channel}";
string targetVersionFile = $"{targetFolder}/{CommitHash}"; string targetVersionFile = $"{targetFolder}/{CommitHash}";