-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathPublishing.props
137 lines (122 loc) · 8.34 KB
/
Publishing.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<Project>
<PropertyGroup>
<ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>
<!-- This avoids creating VS.*.symbols.nupkg packages that are identical to the original package. -->
<AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages>
</PropertyGroup>
<PropertyGroup Condition="'$(DotNetFinalPublish)' != 'true' and '$(DotNetBuild)' != 'true'">
<PushToLocalStorage>true</PushToLocalStorage>
<ArtifactsStagingDir>$(ArtifactsDir)staging/</ArtifactsStagingDir>
<SourceBuiltPdbArtifactsDir>$(ArtifactsStagingDir)SymStore</SourceBuiltPdbArtifactsDir>
<!-- Put blobs where we put packages so our regular globbing in our publish join job finds them. -->
<SourceBuiltAssetsDir>$(ArtifactsStagingDir)</SourceBuiltAssetsDir>
<SourceBuiltShippingPackagesDir>$(ArtifactsStagingDir)packages/$(Configuration)/Shipping</SourceBuiltShippingPackagesDir>
<SourceBuiltNonShippingPackagesDir>$(ArtifactsStagingDir)packages/$(Configuration)/NonShipping</SourceBuiltNonShippingPackagesDir>
<PublishingUseHardlinksIfPossible>true</PublishingUseHardlinksIfPossible>
<!-- We don't use the asset manifest from the vertical dotnet/runtime legs outside of the VMR. Just dump it in a temp dir. -->
<SourceBuiltAssetManifestsDir>$(ArtifactsTmpDir)/manifests/$(Configuration)</SourceBuiltAssetManifestsDir>
<AssetManifestName>VerticalManifest.xml</AssetManifestName>
</PropertyGroup>
<!-- In the runtime official build, we only sign a subset of files. Add all of our blob artifacts here again for publishing -->
<ItemGroup Condition="'$(DotNetFinalPublish)' == 'true'">
<Artifact Include="$(ArtifactsPackagesDir)**\*.tar.gz;
$(ArtifactsPackagesDir)**\*.zip;
$(ArtifactsPackagesDir)**\*.deb;
$(ArtifactsPackagesDir)**\*.rpm;
$(ArtifactsPackagesDir)**\*.pkg;
$(ArtifactsPackagesDir)**\*.exe;
$(ArtifactsPackagesDir)**\*.msi;"
Exclude="$(ArtifactsPackagesDir)**\Symbols.runtime.tar.gz"
Kind="Blob"
IsShipping="$([System.String]::Copy('%(RecursiveDir)').StartsWith('Shipping'))">
<!-- Exclude wixpack.zip files from checksum generation -->
<ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
</Artifact>
</ItemGroup>
<!--
Mark host-RID-targeting assets as Vertical visibility when building in the VMR.
We can't use NETCoreSdkRuntimeIdentifier here as the Arcade SDK projects don't import the .NET SDK.
Instead, just make sure we include the assets targeting "not the output rid", which will catch the host assets.
-->
<ItemGroup Condition="'$(EnableDefaultRidSpecificArtifacts)' != 'true' and '$(DotNetBuildOrchestrator)' == 'true'">
<_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.NETCore.ILAsm.*.nupkg"
Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.NETCore.ILAsm.*.nupkg" />
<_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.NETCore.ILDAsm.*.nupkg"
Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.NETCore.ILDAsm.*.nupkg" />
<_HostArtifact Include="$(ArtifactsPackagesDir)**\runtime.*.Microsoft.DotNet.ILCompiler.*.nupkg"
Exclude="$(ArtifactsPackagesDir)**\runtime.$(OutputRID).Microsoft.DotNet.ILCompiler.*.nupkg" />
<_HostArtifact Include="$(ArtifactsPackagesDir)**\Microsoft.NETCore.App.Crossgen2.*.nupkg"
Exclude="$(ArtifactsPackagesDir)**\Microsoft.NETCore.App.Crossgen2.$(OutputRID).*.nupkg" />
<Artifact Update="@(_HostArtifact)"
Visibility="Vertical"
IsShipping="false" />
</ItemGroup>
<Target Name="GetNonStableProductVersion">
<!-- Retrieve the non-stable runtime pack product version.
Don't stabilize the package version in order to retrieve the VersionSuffix. -->
<MSBuild Projects="$(RepoRoot)src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj"
Targets="ReturnProductVersion"
Properties="IsShipping=false;
Crossgen2SdkOverridePropsPath=;
Crossgen2SdkOverrideTargetsPath=">
<Output TaskParameter="TargetOutputs" PropertyName="NonStableProductVersion" />
</MSBuild>
</Target>
<!--
Only generate the productVersion.txt and runtime-productVersion.txt files when we're building
either the full VMR repo or not building in the VMR infrastructure.
This ensures that we don't produce these files in the "Repo source build" builds,
but we do produce them in both the VMR and the runtime official build.
-->
<PropertyGroup Condition="'$(DotNetBuildOrchestrator)' == 'true'">
<ShouldGenerateProductVersionFiles Condition="'$(PackageRID)' == 'win-x64' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1')">true</ShouldGenerateProductVersionFiles>
<ShouldGenerateProductVersionFiles Condition="'$(DotNetBuildSourceOnly)' == 'true'">true</ShouldGenerateProductVersionFiles>
</PropertyGroup>
<Target Name="GenerateProductVersionFiles"
DependsOnTargets="GetNonStableProductVersion"
BeforeTargets="PublishToAzureDevOpsArtifacts"
Condition="'$(ShouldGenerateProductVersionFiles)' == 'true'">
<!-- Retrieve the runtime pack product version. -->
<MSBuild Projects="$(RepoRoot)src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.CoreCLR.sfxproj"
Targets="ReturnProductVersion"
Properties="Crossgen2SdkOverridePropsPath=;
Crossgen2SdkOverrideTargetsPath=">
<Output TaskParameter="TargetOutputs" PropertyName="ProductVersionForVersionsFile" />
</MSBuild>
<ItemGroup>
<ProductVersionFile Include="$(ArtifactsShippingPackagesDir)productVersion.txt" />
<ProductVersionFile Include="$(ArtifactsShippingPackagesDir)runtime-productVersion.txt" />
</ItemGroup>
<!-- Generate productVersion.txt file containing the product version. -->
<WriteLinesToFile File="%(ProductVersionFile.Identity)"
Lines="$(ProductVersionForVersionsFile)"
Overwrite="true"
Encoding="ASCII" />
<ItemGroup>
<Artifact Include="@(ProductVersionFile)"
RelativeBlobPath="Runtime/$(NonStableProductVersion)/%(Filename)%(Extension)" />
</ItemGroup>
</Target>
<Target Name="AddRelativeBlobPathToInstallerArtifacts"
DependsOnTargets="GetNonStableProductVersion"
BeforeTargets="PublishToAzureDevOpsArtifacts"
AfterTargets="GenerateChecksumsFromArtifacts">
<ItemGroup Condition="'$(DotNetFinalPublish)' == 'true' or '$(DotNetBuildOrchestrator)' == 'true'">
<Artifact Condition="'%(Artifact.Kind)' != 'Package' and '%(Artifact.RelativeBlobPath)' == ''"
RelativeBlobPath="Runtime/$(NonStableProductVersion)/%(Artifact.SubBlobFolder)%(Filename)%(Extension)" />
</ItemGroup>
<!-- In vertical dotnet/runtime legs outside of the VMR, set the "relative blob path" to shipping vs non-shipping to make our download/upload work. -->
<ItemGroup Condition="'$(DotNetFinalPublish)' != 'true' and '$(DotNetBuildOrchestrator)' != 'true'">
<Artifact Condition="'%(Artifact.Kind)' == 'Blob' and '%(Artifact.IsShipping)' == 'true'"
RelativeBlobPath="packages/$(Configuration)/Shipping/%(Filename)%(Extension)" />
<Artifact Condition="'%(Artifact.Kind)' == 'Blob' and '%(Artifact.IsShipping)' != 'true'"
RelativeBlobPath="packages/$(Configuration)/NonShipping/%(Filename)%(Extension)" />
<ItemsToPushToBlobFeed Condition="'%(ItemsToPushToBlobFeed.Kind)' == 'Blob' and '%(ItemsToPushToBlobFeed.IsShipping)' == 'true'"
RelativeBlobPath="packages/$(Configuration)/Shipping/%(Filename)%(Extension)" />
<ItemsToPushToBlobFeed Condition="'%(ItemsToPushToBlobFeed.Kind)' == 'Blob' and '%(ItemsToPushToBlobFeed.IsShipping)' != 'true'"
RelativeBlobPath="packages/$(Configuration)/NonShipping/%(Filename)%(Extension)" />
<Artifact Condition="'%(Artifact.IsVSSetup)' == 'true'"
RelativeBlobPath="VSSetup/%(Filename)%(Extension)" />
</ItemGroup>
</Target>
</Project>