Skip to content

Commit

Permalink
[release/5.0-preview5] Port #768 (#774)
Browse files Browse the repository at this point in the history
* port change from dotnet/core-setup#8426

* PR feedback: remove tabs and fix syntax error

* Missed a file deletion

Co-authored-by: Adam Yoblick <Adam.Yoblick@microsoft.com>
  • Loading branch information
mmitche and AdamYoblick authored May 18, 2020
1 parent f07343f commit 1409595
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 96 deletions.
1 change: 0 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>

<BinariesRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</BinariesRelativePath>
<InstallersRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
</PropertyGroup>

Expand Down
17 changes: 2 additions & 15 deletions eng/stages/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,19 @@ parameters:

stages:

# Create extra stage per BAR channel that needs extra publish steps.
- ${{ each dependency in parameters.dependsOnPublishStages }}:
- stage: PublishBlob_${{ dependency.dependsOn }}
displayName: '${{ dependency.channel.name }} Blob Publish'
dependsOn: PrepareForPublish
variables:
- template: /eng/common/templates/post-build/common-variables.yml
jobs:
- template: /eng/jobs/run-publish-project.yml
parameters:
projectName: publish-blobs
dependency: ${{ dependency }}

# Stages-based publishing entry point
- template: /eng/common/templates/post-build/post-build.yml
parameters:
validateDependsOn:
- ${{ each dependency in parameters.dependsOnPublishStages }}:
- PublishBlob_${{ dependency.dependsOn }}
- PrepareForPublish
# Symbol validation is not ready yet. https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
# SourceLink validation doesn't work in dev builds: tries to pull from GitHub. https://github.com/dotnet/arcade/issues/3604
enableSourceLinkValidation: false
# Allow symbol publish to emit expected warnings without failing the build. Include single
# quotes inside the string so that it passes through to MSBuild without script interference.
symbolPublishingAdditionalParameters: "'-warnAsError:$false'"
publishInstallersAndChecksums: true

# Create extra stage per BAR channel that needs extra publish steps. These run after the Arcade
# stages because they depend on Arcade's NuGet package publish being complete.
Expand Down
37 changes: 32 additions & 5 deletions publish/prepare-artifacts.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<UsingTask TaskName="GenerateChecksums" AssemblyFile="$(LocalBuildToolsTaskFile)" />

<PropertyGroup>
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
</PropertyGroup>

<Target Name="CreateChecksums">
<ItemGroup>
<ArtifactsForGeneratingChecksums
Include="@(UploadToBlobStorageFile)"
DestinationPath="%(FullPath)$(ChecksumExtension)" />

<GeneratedChecksumFile Include="@(ArtifactsForGeneratingChecksums -> '%(DestinationPath)')" />
</ItemGroup>

<GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
</Target>

<Target Name="SignPackages"
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'">
<Message Importance="High" Text="Signing final packages" />
Expand All @@ -13,12 +31,17 @@
<Target Name="UploadPreparedArtifactsToPipeline"
DependsOnTargets="
FindDownloadedArtifacts;
SignPackages">
SignPackages;
CreateChecksums">
<PropertyGroup>
<PreparedFileUploadDir>$(ArtifactsObjDir)PreparedFileUpload\</PreparedFileUploadDir>
</PropertyGroup>

<Copy SourceFiles="@(UploadToBlobStorageFile)" DestinationFolder="$(PreparedFileUploadDir)">
<ItemGroup>
<AllFilesToBlobStorage Include="@(UploadToBlobStorageFile);@(UploadToBlobStorageFile)" />
</ItemGroup>

<Copy SourceFiles="@(AllFilesToBlobStorage)" DestinationFolder="$(PreparedFileUploadDir)">
<Output TaskParameter="CopiedFiles" ItemName="CopiedUploadToBlobStorageFile" />
</Copy>

Expand Down Expand Up @@ -96,9 +119,13 @@

<ItemsToPush
Include="@(UploadToBlobStorageFile)"
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)" />
<ItemsToPush>
<RelativeBlobPath>assets/windowsdesktop/$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)">
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
</ItemsToPush>

<ItemsToPush Include="@(GeneratedChecksumFile)">
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
<Category>Checksum</Category>
</ItemsToPush>
</ItemGroup>

Expand Down
75 changes: 0 additions & 75 deletions publish/publish-blobs.proj

This file was deleted.

0 comments on commit 1409595

Please sign in to comment.