|
4 | 4 | <ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets> |
5 | 5 | <!-- This avoids creating VS.*.symbols.nupkg packages that are identical to the original package. --> |
6 | 6 | <AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages> |
7 | | - <!-- TODO: Change condition when runtime's official publishing starts using Publishing.props: |
8 | | - https://github.com/dotnet/source-build/issues/4239 --> |
9 | | - <EnableDefaultPublishItems Condition="'$(DotNetBuildRepo)' == 'true'">true</EnableDefaultPublishItems> |
| 7 | + <!-- Set PlatformName to TargetArchitecture to create unique build manifest files. --> |
| 8 | + <PlatformName Condition="'$(TargetArchitecture)' != ''">$(TargetArchitecture)</PlatformName> |
10 | 9 | </PropertyGroup> |
11 | 10 |
|
12 | | - <!-- Retrieve the runtime pack product version. |
13 | | - Don't stabilize the package version in order to retrieve the VersionSuffix. --> |
14 | | - <Target Name="GetProductVersion"> |
| 11 | + <Target Name="GetNonStableProductVersion"> |
| 12 | + <!-- Retrieve the non-stable runtime pack product version. |
| 13 | + Don't stabilize the package version in order to retrieve the VersionSuffix. --> |
15 | 14 | <MSBuild Projects="$(RepoRoot)src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj" |
16 | 15 | Targets="ReturnProductVersion" |
17 | 16 | Properties="IsShipping=false; |
18 | 17 | Crossgen2SdkOverridePropsPath=; |
19 | 18 | Crossgen2SdkOverrideTargetsPath="> |
20 | | - <Output TaskParameter="TargetOutputs" PropertyName="RuntimePackProductVersion" /> |
| 19 | + <Output TaskParameter="TargetOutputs" PropertyName="NonStableProductVersion" /> |
21 | 20 | </MSBuild> |
22 | 21 | </Target> |
23 | 22 |
|
24 | | - <!-- Include installer archives and packages which aren't globbed by default. |
25 | | - Don't include Symbols archive as it is already included in Arcade's Publish.proj, with correct blob path. --> |
26 | | - <Target Name="PublishInstallers" |
27 | | - DependsOnTargets="GetProductVersion" |
28 | | - BeforeTargets="PublishToAzureDevOpsArtifacts" |
29 | | - Condition="'$(DotNetBuildRepo)' == 'true'"> |
30 | | - |
31 | | - <ItemGroup> |
32 | | - <InstallerToPublish Include="$(ArtifactsPackagesDir)**\*.tar.gz; |
33 | | - $(ArtifactsPackagesDir)**\*.zip; |
34 | | - $(ArtifactsPackagesDir)**\*.deb; |
35 | | - $(ArtifactsPackagesDir)**\*.rpm; |
36 | | - $(ArtifactsPackagesDir)**\*.pkg; |
37 | | - $(ArtifactsPackagesDir)**\*.exe; |
38 | | - $(ArtifactsPackagesDir)**\*.msi" |
39 | | - Exclude="$(ArtifactsPackagesDir)**\Symbols.runtime.tar.gz" /> |
40 | | - <ItemsToPushToBlobFeed Include="@(InstallerToPublish)" |
41 | | - IsShipping="$([System.String]::Copy('%(RecursiveDir)').StartsWith('Shipping'))" |
42 | | - PublishFlatContainer="true" |
43 | | - RelativeBlobPath="Runtime/$(RuntimePackProductVersion)/%(Filename)%(Extension)" /> |
44 | | - |
45 | | - <!-- Include checksums --> |
46 | | - <ChecksumToPublish Include="$(ArtifactsPackagesDir)**\*.sha512" /> |
47 | | - <ItemsToPushToBlobFeed Include="@(ChecksumToPublish)" |
48 | | - IsShipping="false" |
49 | | - PublishFlatContainer="true" |
50 | | - RelativeBlobPath="Runtime/$(RuntimePackProductVersion)/%(Filename)%(Extension)" /> |
51 | | - </ItemGroup> |
52 | | - </Target> |
53 | | - |
54 | | - <Target Name="GenerateAndPublishProductVersionFiles" |
55 | | - DependsOnTargets="GetProductVersion" |
56 | | - Condition="'$(EnableDefaultPublishItems)' == 'true'" |
| 23 | + <!-- This target only runs when EnableDefaultArtifacts=true which is a single build leg in CI. --> |
| 24 | + <Target Name="GenerateProductVersionFiles" |
| 25 | + DependsOnTargets="GetNonStableProductVersion" |
57 | 26 | BeforeTargets="PublishToAzureDevOpsArtifacts"> |
| 27 | + <!-- Retrieve the runtime pack product version. --> |
| 28 | + <MSBuild Projects="$(RepoRoot)src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj" |
| 29 | + Targets="ReturnProductVersion" |
| 30 | + Properties="Crossgen2SdkOverridePropsPath=; |
| 31 | + Crossgen2SdkOverrideTargetsPath="> |
| 32 | + <Output TaskParameter="TargetOutputs" PropertyName="ProductVersionForVersionsFile" /> |
| 33 | + </MSBuild> |
| 34 | + |
58 | 35 | <ItemGroup> |
59 | 36 | <ProductVersionFile Include="$(ArtifactsShippingPackagesDir)productVersion.txt" /> |
60 | 37 | <ProductVersionFile Include="$(ArtifactsShippingPackagesDir)runtime-productVersion.txt" /> |
61 | 38 | </ItemGroup> |
62 | 39 |
|
63 | 40 | <!-- Generate productVersion.txt file containing the product version. --> |
64 | 41 | <WriteLinesToFile File="%(ProductVersionFile.Identity)" |
65 | | - Lines="$(RuntimePackProductVersion)" |
| 42 | + Lines="$(ProductVersionForVersionsFile)" |
66 | 43 | Overwrite="true" |
67 | 44 | Encoding="ASCII" /> |
68 | | - |
| 45 | + |
| 46 | + <ItemGroup> |
| 47 | + <Artifact Include="@(ProductVersionFile)" |
| 48 | + RelativeBlobPath="Runtime/$(NonStableProductVersion)/%(Filename)%(Extension)" /> |
| 49 | + </ItemGroup> |
| 50 | + </Target> |
| 51 | + |
| 52 | + <Target Name="AddRelativeBlobPathToInstallerArtifacts" |
| 53 | + DependsOnTargets="GetNonStableProductVersion" |
| 54 | + BeforeTargets="PublishToAzureDevOpsArtifacts" |
| 55 | + AfterTargets="GenerateChecksumsFromArtifacts"> |
69 | 56 | <ItemGroup> |
70 | | - <ItemsToPushToBlobFeed Include="@(ProductVersionFile)" |
71 | | - IsShipping="false" |
72 | | - PublishFlatContainer="true" |
73 | | - RelativeBlobPath="Runtime/$(RuntimePackProductVersion)/%(Filename)%(Extension)" /> |
| 57 | + <Artifact Condition="'%(Artifact.PublishFlatContainer)' == 'true' and '%(Artifact.RelativeBlobPath)' == ''" |
| 58 | + RelativeBlobPath="Runtime/$(NonStableProductVersion)/%(Filename)%(Extension)" /> |
74 | 59 | </ItemGroup> |
75 | 60 | </Target> |
76 | 61 |
|
|
0 commit comments