2018-12-19 20:53:08 +00:00
<?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>
2018-12-20 00:08:49 +00:00
<Import Project="$(RepoRoot)\src\redist\targets\Versions.targets" />
2018-12-19 20:53:08 +00:00
<PropertyGroup>
<Product>Sdk</Product>
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
<BlobStoragePartialRelativePath Condition="'$(IsNotOrchestratedPublish)' == 'false'">assets/$(Product)</BlobStoragePartialRelativePath>
2018-12-20 00:08:49 +00:00
<PublishToBlobFeedFlatContainer>true</PublishToBlobFeedFlatContainer>
2018-12-21 22:58:11 +00:00
<ChecksumsFeedUrl>$(DotnetPublishChecksumsBlobFeedUrl)</ChecksumsFeedUrl>
<ChecksumsAccountKey>$(DotNetPublishChecksumsBlobFeedKey)</ChecksumsAccountKey>
<SdkAssetsFeedUrl>$(DotnetPublishSdkAssetsBlobFeedUrl)</SdkAssetsFeedUrl>
<SdkAssetsAzureAccountKey>$(DotNetPublishSdkAssetsBlobFeedKey)</SdkAssetsAzureAccountKey>
<PublishSdkAssetsAndChecksumsToBlob>false</PublishSdkAssetsAndChecksumsToBlob>
<PublishSdkAssetsAndChecksumsToBlob Condition=" '$(ChecksumsFeedUrl)' != '' and '$(SdkAssetsFeedUrl)' != '' ">true</PublishSdkAssetsAndChecksumsToBlob>
2018-12-22 05:43:17 +00:00
2018-12-26 19:42:24 +00:00
<PublishBinariesAndBadge Condition=" '$(PublishBinariesAndBadge)' == '' ">true</PublishBinariesAndBadge>
2018-12-19 20:53:08 +00:00
</PropertyGroup>
2018-12-24 18:12:23 +00:00
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' " />
2019-01-24 21:12:57 +00:00
<PropertyGroup>
<!-- Because we may be building in a container, we should use an asset manifest file path
2019-01-28 18:32:29 +00:00
that exists in the container. Disambiguate the manifests via available properties.
AGENT_OS and AGENT_JOBNAME are present on Azure DevOps agents -->
<AssetManifestFileName Condition="'$(AGENT_OS)' != ''">$(AGENT_OS)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(AGENT_OS)' == ''">$(OS)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(AGENT_JOBNAME)' != ''">$(AssetManifestFileName)-$(AGENT_JOBNAME)</AssetManifestFileName>
<AssetManifestFileName Condition="'$(AGENT_JOBNAME)' == '' and '$(Architecture)' != ''">$(AssetManifestFileName)-$(Architecture)</AssetManifestFileName>
2019-01-24 22:00:22 +00:00
<ChecksumsAssetManifestFileName>$(AssetManifestFileName)-checksums</ChecksumsAssetManifestFileName>
2019-01-24 22:28:52 +00:00
<!-- 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>
2019-01-24 21:12:57 +00:00
</PropertyGroup>
2018-12-24 18:12:23 +00:00
2018-12-19 20:53:08 +00:00
<ItemGroup>
2018-12-26 19:42:24 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.tar.gz" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
2018-12-19 20:53:08 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.pkg" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.exe" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.deb" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.rpm" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.msi" />
2018-12-21 22:58:11 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.nupkg" />
2019-01-24 19:21:51 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.svg" Condition=" '$(PublishBinariesAndBadge)' == 'true' ">
<ExcludeFromManifest>true</ExcludeFromManifest>
</SdkAssetsToPublish>
2019-01-25 22:36:14 +00:00
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.nupkg" />
2018-12-21 22:58:11 +00:00
<CheckSumsToPublish Include="$(ArtifactsShippingPackagesDir)*.sha" />
2018-12-26 19:42:24 +00:00
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.zip.sha" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/>
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)*.tar.gz.sha" Condition=" '$(PublishBinariesAndBadge)' == 'false' "/>
2018-12-19 20:53:08 +00:00
</ItemGroup>
2018-12-21 22:58:11 +00:00
<Target Name="PublishSdkAssetsAndChecksums"
BeforeTargets="Publish"
DependsOnTargets="SetSdkVersionInfo"
Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' ">
2018-12-20 00:08:49 +00:00
<ItemGroup>
2018-12-21 22:58:11 +00:00
<SdkAssetsToPushToBlobFeed Include="@(SdkAssetsToPublish)" IsShipping="true" >
2018-12-20 00:08:49 +00:00
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(SdkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
2018-12-21 22:58:11 +00:00
</SdkAssetsToPushToBlobFeed>
2019-01-25 22:36:14 +00:00
<SdkAssetsToPushToBlobFeed Include="@(SdkNonShippingAssetsToPublish)" IsShipping="false" >
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(SdkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
2018-12-21 22:58:11 +00:00
</SdkAssetsToPushToBlobFeed>
<ChecksumsToPushToBlobFeed Include="@(CheckSumsToPublish)" IsShipping="true" >
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(SdkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
</ChecksumsToPushToBlobFeed>
2018-12-20 00:08:49 +00:00
</ItemGroup>
2018-12-21 22:58:11 +00:00
<PushToBlobFeed
ExpectedFeedUrl="$(SdkAssetsFeedUrl)"
AccountKey="$(SdkAssetsAzureAccountKey)"
ItemsToPush="@(SdkAssetsToPushToBlobFeed)"
ManifestBuildData="Location=$(SdkAssetsFeedUrl)"
ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
2019-01-24 22:28:52 +00:00
AssetManifestPath="$(DotNetAssetManifestFilePath)"
2019-01-24 19:21:51 +00:00
PublishFlatContainer="true" />
2018-12-21 22:58:11 +00:00
<PushToBlobFeed
ExpectedFeedUrl="$(ChecksumsFeedUrl)"
AccountKey="$(ChecksumsAccountKey)"
ItemsToPush="@(ChecksumsToPushToBlobFeed)"
ManifestBuildData="Location=$(ChecksumsFeedUrl)"
ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
2019-01-24 22:00:22 +00:00
AssetManifestPath="$(ChecksumsAssetManifestFilePath)"
2018-12-21 22:58:11 +00:00
PublishFlatContainer="true"/>
</Target>
2018-12-19 20:53:08 +00:00
</Project>