Skip to content

Commit 543fff4

Browse files
committed
port change from dotnet/core-setup#8426
1 parent 853a839 commit 543fff4

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

Directory.Build.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747

4848
<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>
4949

50-
<BinariesRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</BinariesRelativePath>
5150
<InstallersRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
5251
</PropertyGroup>
5352

eng/stages/publish.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,19 @@ parameters:
33

44
stages:
55

6-
# Create extra stage per BAR channel that needs extra publish steps.
7-
- ${{ each dependency in parameters.dependsOnPublishStages }}:
8-
- stage: PublishBlob_${{ dependency.dependsOn }}
9-
displayName: '${{ dependency.channel.name }} Blob Publish'
10-
dependsOn: PrepareForPublish
11-
variables:
12-
- template: /eng/common/templates/post-build/common-variables.yml
13-
jobs:
14-
- template: /eng/jobs/run-publish-project.yml
15-
parameters:
16-
projectName: publish-blobs
17-
dependency: ${{ dependency }}
18-
196
# Stages-based publishing entry point
207
- template: /eng/common/templates/post-build/post-build.yml
218
parameters:
229
validateDependsOn:
23-
- ${{ each dependency in parameters.dependsOnPublishStages }}:
24-
- PublishBlob_${{ dependency.dependsOn }}
10+
- PrepareForPublish
2511
# Symbol validation is not ready yet. https://github.com/dotnet/arcade/issues/2871
2612
enableSymbolValidation: false
2713
# SourceLink validation doesn't work in dev builds: tries to pull from GitHub. https://github.com/dotnet/arcade/issues/3604
2814
enableSourceLinkValidation: false
2915
# Allow symbol publish to emit expected warnings without failing the build. Include single
3016
# quotes inside the string so that it passes through to MSBuild without script interference.
3117
symbolPublishingAdditionalParameters: "'-warnAsError:$false'"
18+
publishInstallersAndChecksums: true
3219

3320
# Create extra stage per BAR channel that needs extra publish steps. These run after the Arcade
3421
# stages because they depend on Arcade's NuGet package publish being complete.

publish/prepare-artifacts.proj

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
<Project>
22
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
33

4+
<UsingTask TaskName="GenerateChecksums" AssemblyFile="$(LocalBuildToolsTaskFile)" />
5+
6+
<PropertyGroup>
7+
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
8+
</PropertyGroup>
9+
10+
<Target Name="CreateChecksums">
11+
<ItemGroup>
12+
<ArtifactsForGeneratingChecksums
13+
Include="@(UploadToBlobStorageFile)"
14+
DestinationPath="%(FullPath)$(ChecksumExtension)" />
15+
16+
<GeneratedChecksumFile Include="@(ArtifactsForGeneratingChecksums -> '%(DestinationPath)')" />
17+
</ItemGroup>
18+
19+
<GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
20+
</Target>
21+
422
<Target Name="SignPackages"
523
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'">
624
<Message Importance="High" Text="Signing final packages" />
@@ -13,12 +31,17 @@
1331
<Target Name="UploadPreparedArtifactsToPipeline"
1432
DependsOnTargets="
1533
FindDownloadedArtifacts;
16-
SignPackages">
34+
SignPackages;
35+
CreateChecksums">
1736
<PropertyGroup>
1837
<PreparedFileUploadDir>$(ArtifactsObjDir)PreparedFileUpload\</PreparedFileUploadDir>
1938
</PropertyGroup>
2039

21-
<Copy SourceFiles="@(UploadToBlobStorageFile)" DestinationFolder="$(PreparedFileUploadDir)">
40+
<ItemGroup>
41+
<AllFilesToBlobStorage Include="@(UploadToBlobStorageFile);@(UploadToBlobStorageFile)" />
42+
</ItemGroup>
43+
44+
<Copy SourceFiles="@(AllFilesToBlobStorage)" DestinationFolder="$(PreparedFileUploadDir)">
2245
<Output TaskParameter="CopiedFiles" ItemName="CopiedUploadToBlobStorageFile" />
2346
</Copy>
2447

@@ -96,10 +119,13 @@
96119

97120
<ItemsToPush
98121
Include="@(UploadToBlobStorageFile)"
99-
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)" />
100-
<ItemsToPush>
101-
<RelativeBlobPath>assets/windowsdesktop/$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
122+
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)">
123+
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
102124
</ItemsToPush>
125+
126+
<ItemsToPush Include="@(GeneratedChecksumFile)">
127+
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
128+
<Category>Checksum</Category>
103129
</ItemGroup>
104130

105131
<!-- Push items to AzDO as build artifacts, generating the asset manifest as a side effect. -->

0 commit comments

Comments
 (0)