95 lines
5.9 KiB
XML
95 lines
5.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
|
|
<Project>
|
|
|
|
<Import Project="$(RepoRoot)\src\redist\targets\Versions.targets" />
|
|
|
|
<PropertyGroup>
|
|
<Product>Sdk</Product>
|
|
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
|
|
<BlobStoragePartialRelativePath Condition="'$(IsNotOrchestratedPublish)' == 'false'">assets/$(Product)</BlobStoragePartialRelativePath>
|
|
<PublishToBlobFeedFlatContainer>true</PublishToBlobFeedFlatContainer>
|
|
<ChecksumsFeedUrl>$(DotnetPublishChecksumsBlobFeedUrl)</ChecksumsFeedUrl>
|
|
<ChecksumsAccountKey>$(DotNetPublishChecksumsBlobFeedKey)</ChecksumsAccountKey>
|
|
<SdkAssetsFeedUrl>$(DotnetPublishSdkAssetsBlobFeedUrl)</SdkAssetsFeedUrl>
|
|
<SdkAssetsAzureAccountKey>$(DotNetPublishSdkAssetsBlobFeedKey)</SdkAssetsAzureAccountKey>
|
|
|
|
<PublishSdkAssetsAndChecksumsToBlob>false</PublishSdkAssetsAndChecksumsToBlob>
|
|
<PublishSdkAssetsAndChecksumsToBlob Condition=" '$(ChecksumsFeedUrl)' != '' and '$(SdkAssetsFeedUrl)' != '' ">true</PublishSdkAssetsAndChecksumsToBlob>
|
|
|
|
<PublishBinariesAndBadge Condition=" '$(PublishBinariesAndBadge)' == '' ">true</PublishBinariesAndBadge>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' " />
|
|
|
|
<PropertyGroup>
|
|
<!-- Because we may be building in a container, we should use an asset manifest file path
|
|
that exists in the container. Disambiguate the manifests via RID and architecture -->
|
|
<AssetManifestFileName Condition="'$(AGENT_OS)' != ''">$(AGENT_OS)-$(PlatformName)</AssetManifestFileName>
|
|
<AssetManifestFileName Condition="'$(AGENT_OS)' == ''">$(OS)-$(PlatformName)</AssetManifestFileName>
|
|
<AssetManifestFileName Condition="'$(Rid)' != ''">$(AssetManifestFileName)-$(Rid)</AssetManifestFileName>
|
|
<AssetManifestFileName Condition="'$(Architecture)' != ''">$(AssetManifestFileName)-$(Architecture)</AssetManifestFileName>
|
|
<ChecksumsAssetManifestFileName>$(AssetManifestFileName)-checksums</ChecksumsAssetManifestFileName>
|
|
<!-- Property AssetManifestFilePath will be reassigned by the Arcade SDK, so use a different name (DotNetAssetManifestFilePath) -->
|
|
<DotNetAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(AssetManifestFileName).xml</DotNetAssetManifestFilePath>
|
|
<ChecksumsAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(ChecksumsAssetManifestFileName).xml</ChecksumsAssetManifestFilePath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.tar.gz" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.pkg" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.exe" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.deb" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.rpm" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.msi" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.nupkg" />
|
|
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.svg" Condition=" '$(PublishBinariesAndBadge)' == 'true' ">
|
|
<ExcludeFromManifest>true</ExcludeFromManifest>
|
|
</SdkAssetsToPublish>
|
|
<CheckSumsToPublish Include="$(ArtifactsShippingPackagesDir)*.sha" />
|
|
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.zip.sha" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/>
|
|
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.tar.gz.sha" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/>
|
|
</ItemGroup>
|
|
|
|
<Target Name="PublishSdkAssetsAndChecksums"
|
|
BeforeTargets="Publish"
|
|
DependsOnTargets="SetSdkVersionInfo"
|
|
Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' ">
|
|
<ItemGroup>
|
|
<SdkAssetsToPushToBlobFeed Include="@(SdkAssetsToPublish)" IsShipping="true" >
|
|
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(SdkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
|
<ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
|
|
</SdkAssetsToPushToBlobFeed>
|
|
|
|
<ChecksumsToPushToBlobFeed Include="@(CheckSumsToPublish)" IsShipping="true" >
|
|
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(SdkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
|
<ManifestArtifactData>ShipInstaller=dotnetclichecksums</ManifestArtifactData>
|
|
</ChecksumsToPushToBlobFeed>
|
|
</ItemGroup>
|
|
|
|
<PushToBlobFeed
|
|
ExpectedFeedUrl="$(SdkAssetsFeedUrl)"
|
|
AccountKey="$(SdkAssetsAzureAccountKey)"
|
|
ItemsToPush="@(SdkAssetsToPushToBlobFeed)"
|
|
ManifestBuildData="Location=$(SdkAssetsFeedUrl)"
|
|
ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
|
|
ManifestBranch="$(BUILD_SOURCEBRANCH)"
|
|
ManifestBuildId="$(BUILD_BUILDNUMBER)"
|
|
ManifestCommit="$(BUILD_SOURCEVERSION)"
|
|
AssetManifestPath="$(DotNetAssetManifestFilePath)"
|
|
PublishFlatContainer="true" />
|
|
|
|
<PushToBlobFeed
|
|
ExpectedFeedUrl="$(ChecksumsFeedUrl)"
|
|
AccountKey="$(ChecksumsAccountKey)"
|
|
ItemsToPush="@(ChecksumsToPushToBlobFeed)"
|
|
ManifestBuildData="Location=$(ChecksumsFeedUrl)"
|
|
ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
|
|
ManifestBranch="$(BUILD_SOURCEBRANCH)"
|
|
ManifestBuildId="$(BUILD_BUILDNUMBER)"
|
|
ManifestCommit="$(BUILD_SOURCEVERSION)"
|
|
AssetManifestPath="$(ChecksumsAssetManifestFilePath)"
|
|
PublishFlatContainer="true"/>
|
|
</Target>
|
|
</Project>
|