| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <Project>
- <PropertyGroup>
- <ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>
- <!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows.
- Do not remove if post build sign is true, as we avoid the xplat codesign jobs, and need to have
- the nupkgs pushed. Do not do this if building from source, since we want the source build intermediate package
- to be published. Use DotNetBuildRepo is only set in the internal source build,
- and Build.proj is invoked from the wrapper build. -->
- <EnableDefaultArtifacts Condition="'$(OS)' != 'Windows_NT' and
- '$(PostBuildSign)' != 'true' and
- '$(DotNetBuildRepo)' != 'true'">false</EnableDefaultArtifacts>
- <PublishInstallerBaseVersion Condition="'$(PublishInstallerBaseVersion)' == '' and
- ('$(OS)' == 'Windows_NT' or '$(DotNetBuildOrchestrator)' == 'true')">true</PublishInstallerBaseVersion>
- <!-- This avoids creating VS.*.symbols.nupkg packages that are identical to the original package. -->
- <AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages>
- </PropertyGroup>
- <!-- $(InstallersOutputPath), $(SymbolsOutputPath), and $(ChecksumExtensions) are not defined. Root Directory.Build.props is not imported. -->
- <ItemGroup>
- <!-- Include our "loose" PDBs when publishing symbols. -->
- <FilesToPublishToSymbolServer Include="$(ArtifactsDir)symbols\**\*.pdb" />
- <!-- Prepare for _PublishInstallersAndChecksums target. -->
- <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.jar" UploadPathSegment="jar" />
- <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.pom" UploadPathSegment="jar" />
- <!-- All builds produce npm assets - only publish them once -->
- <_InstallersToPublish Include="$(ArtifactsDir)packages\**\*.tgz" UploadPathSegment="npm" Condition="'$(OS)' == 'Windows_NT' or '$(DotNetBuildOrchestrator)' == 'true'" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.version" UploadPathSegment="Runtime" Condition="'$(PublishInstallerBaseVersion)' == 'true'" />
- <!-- The following installers create checksums -->
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.deb" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.exe" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.msi" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.rpm" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.tar.gz" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.wixlib" UploadPathSegment="Runtime" ChecksumPath="%(FullPath).sha512" />
- <_InstallersToPublish Include="$(ArtifactsDir)installers\**\*.zip" UploadPathSegment="Runtime" >
- <!-- Exclude wixpack.zip files from checksum generation -->
- <ChecksumPath Condition="$([System.String]::Copy('%(Filename)%(Extension)').EndsWith('.wixpack.zip')) != 'true'">%(FullPath).sha512</ChecksumPath>
- </_InstallersToPublish>
- <!-- Remove wixpacks if not doing post-build signing, since they are not needed -->
- <_InstallersToPublish Remove="$(ArtifactsDir)installers\**\*.wixpack.zip" Condition="'$(PostBuildSign)' != 'true'" />
- <Artifact Include="@(_InstallersToPublish)">
- <!-- Working around msbuild not being able to negate the result of Contains() outside of targets -->
- <IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) == 'True'">false</IsShipping>
- <IsShipping Condition="$([System.String]::Copy('%(Filename)').ToLowerInvariant().Contains('internal')) != 'True'">true</IsShipping>
- </Artifact>
- </ItemGroup>
- <Target Name="GetNonStableProductVersion">
- <!--
- This target is defined in eng/targets/Packaging.targets and Npm.Common.targets and included in every C#, F#,
- and npm project. We use Microsoft.AspNetCore.InternalTesting.csproj because it is non-shipping (we need a non-stable
- version string to use as our publish location) non-packed (won't be shipped in the future).
- -->
- <MSBuild Projects="$(RepoRoot)src\Testing\src\Microsoft.AspNetCore.InternalTesting.csproj"
- Properties="ExcludeFromBuild=false"
- Targets="_GetPackageVersionInfo">
- <Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
- </MSBuild>
- <PropertyGroup>
- <NonStableProductVersion>%(_ResolvedPackageVersionInfo.PackageVersion)</NonStableProductVersion>
- </PropertyGroup>
- </Target>
- <Target Name="GenerateProductVersionFiles"
- BeforeTargets="PublishToAzureDevOpsArtifacts"
- DependsOnTargets="GetNonStableProductVersion"
- Condition="'$(PublishInstallerBaseVersion)' == 'true'">
- <MSBuild Projects="$(RepoRoot)src\Testing\src\Microsoft.AspNetCore.InternalTesting.csproj"
- Properties="ExcludeFromBuild=false;IsShipping=true"
- Targets="_GetPackageVersionInfo">
- <Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" />
- </MSBuild>
- <PropertyGroup>
- <ProductVersion>%(_ResolvedPackageVersionInfo.PackageVersion)</ProductVersion>
- </PropertyGroup>
- <ItemGroup>
- <ProductVersionFile Include="$(ArtifactsShippingPackagesDir)productVersion.txt" />
- <ProductVersionFile Include="$(ArtifactsShippingPackagesDir)aspnetcore-productVersion.txt" />
- </ItemGroup>
- <!-- Generate productVersion.txt file containing the product version. -->
- <WriteLinesToFile File="%(ProductVersionFile.Identity)"
- Lines="$(ProductVersion)"
- Overwrite="true"
- Encoding="ASCII" />
- <ItemGroup>
- <Artifact Include="@(ProductVersionFile)"
- RelativeBlobPath="aspnetcore/Runtime/$(NonStableProductVersion)/%(Filename)%(Extension)" />
- </ItemGroup>
- </Target>
- <Target Name="AddRelativeBlobPathToInstallerArtifacts"
- BeforeTargets="PublishToAzureDevOpsArtifacts"
- AfterTargets="GenerateChecksumsFromArtifacts"
- DependsOnTargets="GetNonStableProductVersion">
- <ItemGroup>
- <Artifact Condition="'%(Artifact.PublishFlatContainer)' == 'true' and '%(Artifact.UploadPathSegment)' != ''"
- RelativeBlobPath="aspnetcore/%(Artifact.UploadPathSegment)/$(NonStableProductVersion)/%(Filename)%(Extension)" />
- </ItemGroup>
- </Target>
- </Project>
|