|
| 1 | +<Project> |
| 2 | + <PropertyGroup Condition=" HasTrailingSlash('$(ArtifactsDir)') "> |
| 3 | + <!-- The one use of ArtifactsDir in Publish.proj adds an additional slash, confusing itself. --> |
| 4 | + <ArtifactsDir>$(ArtifactsDir.Substring(0, $([MSBuild]::Subtract($(ArtifactsDir.Length), 1))))</ArtifactsDir> |
| 5 | + |
| 6 | + <PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishInstallers</PublishDependsOnTargets> |
| 7 | + |
| 8 | + <_UploadPathRoot>aspnetcore</_UploadPathRoot> |
| 9 | + </PropertyGroup> |
| 10 | + |
| 11 | + <!-- $(InstallersOutputPath) and $(SymbolsOutputPath) are not defined. Root Directory.Build.props is not imported. --> |
| 12 | + <ItemGroup> |
| 13 | + <!-- Include our "loose" PDBs when publishing symbols. --> |
| 14 | + <FilesToPublishToSymbolServer Include="$(ArtifactsDir)\symbols\**\*.pdb" /> |
| 15 | + |
| 16 | + <!-- Prepare for _PublishInstallers target. --> |
| 17 | + <_InstallersToPublish Remove="@(_InstallersToPublish)" /> |
| 18 | + <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.jar" UploadPathSegment="jar" /> |
| 19 | + <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.pom" UploadPathSegment="jar" /> |
| 20 | + <_InstallersToPublish Include="$(ArtifactsDir)\packages\**\*.tgz" UploadPathSegment="npm" /> |
| 21 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.deb" UploadPathSegment="Runtime" /> |
| 22 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.exe" UploadPathSegment="Runtime" /> |
| 23 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.msi" UploadPathSegment="Runtime" /> |
| 24 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.rpm" UploadPathSegment="Runtime" /> |
| 25 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.tar.gz" UploadPathSegment="Runtime" /> |
| 26 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.version" UploadPathSegment="Runtime" |
| 27 | + Condition=" '$(PublishInstallerBaseVersion)' == 'true' " /> |
| 28 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.wixlib" UploadPathSegment="Runtime" /> |
| 29 | + <_InstallersToPublish Include="$(ArtifactsDir)\installers\**\*.zip" UploadPathSegment="Runtime" /> |
| 30 | + </ItemGroup> |
| 31 | + |
| 32 | + <Target Name="_PublishInstallers"> |
| 33 | + <!-- This target is defined in eng/targets/Packaging.targets and included in every C# and F# project. --> |
| 34 | + <MSBuild Projects="$(RepoRoot)src\Mvc\Mvc\src\Microsoft.AspNetCore.Mvc.csproj" |
| 35 | + Targets="_GetPackageVersionInfo" |
| 36 | + SkipNonexistentProjects="false"> |
| 37 | + <Output TaskParameter="TargetOutputs" ItemName="_ResolvedPackageVersionInfo" /> |
| 38 | + </MSBuild> |
| 39 | + |
| 40 | + <PropertyGroup> |
| 41 | + <_PackageVersion>@(_ResolvedPackageVersionInfo->'%(PackageVersion)')</_PackageVersion> |
| 42 | + </PropertyGroup> |
| 43 | + |
| 44 | + <ItemGroup> |
| 45 | + <!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows. --> |
| 46 | + <ItemsToPushToBlobFeed Remove="@(ItemsToPushToBlobFeed)" Condition="'$(OS)' != 'Windows_NT'" /> |
| 47 | + |
| 48 | + <ItemsToPushToBlobFeed Include="@(_InstallersToPublish)"> |
| 49 | + <IsShipping>false</IsShipping> |
| 50 | + <ManifestArtifactData>NonShipping=true;ShipInstaller=dotnetcli</ManifestArtifactData> |
| 51 | + <PublishFlatContainer>true</PublishFlatContainer> |
| 52 | + <RelativeBlobPath>$(_UploadPathRoot)/%(_InstallersToPublish.UploadPathSegment)/$(_PackageVersion)/%(Filename)%(Extension)</RelativeBlobPath> |
| 53 | + </ItemsToPushToBlobFeed> |
| 54 | + </ItemGroup> |
| 55 | + </Target> |
| 56 | +</Project> |
0 commit comments