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>
<PropertyGroup>
<Product>Sdk</Product>
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
<BlobStoragePartialRelativePath Condition="'$(IsNotOrchestratedPublish)' == 'false'">assets/$(Product)</BlobStoragePartialRelativePath>
2018-12-21 22:58:11 +00:00
<ChecksumsFeedUrl>$(DotnetPublishChecksumsBlobFeedUrl)</ChecksumsFeedUrl>
<SdkAssetsFeedUrl>$(DotnetPublishSdkAssetsBlobFeedUrl)</SdkAssetsFeedUrl>
<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>
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-09-10 19:33:20 +00:00
<DotnetTempWorkingDirectory>$(ArtifactsDir)..\DotnetAssetsTmpDir\$([System.Guid]::NewGuid())</DotnetTempWorkingDirectory>
<ChecksumTempWorkingDirectory>$(ArtifactsDir)..\ChecksumAssetsTmpDir\$([System.Guid]::NewGuid())</ChecksumTempWorkingDirectory>
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-05-16 23:33:29 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.cab" />
2019-09-10 19:33:20 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.svg" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
2020-03-26 20:32:21 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productVersion.txt" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
2020-03-27 12:49:29 +00:00
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.txt" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
2019-01-25 22:36:14 +00:00
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.nupkg" />
2019-07-24 20:17:25 +00:00
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.swr" />
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"
Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' ">
2019-10-07 20:11:06 +00:00
2020-01-10 05:13:46 +00:00
<ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version">
<Output
TaskParameter="Lines"
PropertyName="FullNugetVersion"/>
</ReadLinesFromFile>
2019-10-07 20:11:06 +00:00
<!-- If the sdk version is stabilized, then we should double publish the binaries to suffixed file names.
To do this, create new copies of the blobs, replacing the SdkVersion string in the file name with the
FullNugetVersion, except if the FullNuGetVersion is already in the file name (which would end up
publishing the same exact file name twice). -->
2019-12-20 21:13:26 +00:00
<ItemGroup Condition="'$(DotNetFinalVersionKind)'== 'release'">
<SdkAssetsToCopyWithSuffix Include="@(SdkAssetsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(Version)`))' == 'true'">
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(Version)' ,'$(FullNuGetVersion)'))</SuffixedPath>
2019-10-07 20:11:06 +00:00
</SdkAssetsToCopyWithSuffix>
2019-12-20 21:13:26 +00:00
<CheckSumsToCopyWithSuffix Include="@(CheckSumsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(Version)`))' == 'true'">
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(Version)' ,'$(FullNuGetVersion)'))</SuffixedPath>
2019-10-07 20:11:06 +00:00
</CheckSumsToCopyWithSuffix>
</ItemGroup>
<Copy
SourceFiles="@(SdkAssetsToCopyWithSuffix -> '%(Identity)')"
DestinationFiles="@(SdkAssetsToCopyWithSuffix -> '%(SuffixedPath)')">
<Output TaskParameter="CopiedFiles" ItemName="SdkAssetsToPublishWithSuffix" />
</Copy>
<Copy
SourceFiles="@(CheckSumsToCopyWithSuffix -> '%(Identity)')"
DestinationFiles="@(CheckSumsToCopyWithSuffix -> '%(SuffixedPath)')">
<Output TaskParameter="CopiedFiles" ItemName="CheckSumsToPublishWithSuffix" />
</Copy>
2018-12-20 00:08:49 +00:00
<ItemGroup>
2019-10-07 20:11:06 +00:00
<!-- Always publish blobs to a suffixed directory. -->
2019-06-26 20:55:25 +00:00
<SdkAssetsToPushToBlobFeed Include="@(SdkAssetsToPublish)">
2019-10-07 20:11:06 +00:00
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
2018-12-21 22:58:11 +00:00
</SdkAssetsToPushToBlobFeed>
2019-06-26 20:55:25 +00:00
<SdkAssetsToPushToBlobFeed Include="@(SdkNonShippingAssetsToPublish)">
2019-10-07 20:11:06 +00:00
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
2019-06-26 20:55:25 +00:00
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
2018-12-21 22:58:11 +00:00
</SdkAssetsToPushToBlobFeed>
2019-06-26 20:55:25 +00:00
<ChecksumsToPushToBlobFeed Include="@(CheckSumsToPublish)">
2019-10-07 20:11:06 +00:00
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
2018-12-21 22:58:11 +00:00
</ChecksumsToPushToBlobFeed>
2019-10-07 20:11:06 +00:00
<SdkAssetsWithSuffixToPushToBlobFeed Include="@(SdkAssetsToPublishWithSuffix)">
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</SdkAssetsWithSuffixToPushToBlobFeed>
2019-12-20 21:13:26 +00:00
<ChecksumsWithSuffixToPushToBlobFeed Include="@(CheckSumsToPublishWithSuffix)" Condition="'$(DotNetFinalVersionKind)'== 'release'">
2019-10-07 20:11:06 +00:00
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</ChecksumsWithSuffixToPushToBlobFeed>
2018-12-20 00:08:49 +00:00
</ItemGroup>
2019-09-10 19:33:20 +00:00
<PushToAzureDevOpsArtifacts
2019-10-07 20:11:06 +00:00
ItemsToPush="@(SdkAssetsToPushToBlobFeed);@(SdkAssetsWithSuffixToPushToBlobFeed)"
2018-12-21 22:58:11 +00:00
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)"
2020-02-28 22:01:01 +00:00
PublishFlatContainer="true" />
2018-12-21 22:58:11 +00:00
2019-09-10 19:33:20 +00:00
<PushToAzureDevOpsArtifacts
2019-10-07 20:11:06 +00:00
ItemsToPush="@(ChecksumsToPushToBlobFeed);@(ChecksumsWithSuffixToPushToBlobFeed)"
2018-12-21 22:58:11 +00:00
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)"
2020-02-28 22:01:01 +00:00
PublishFlatContainer="true" />
2018-12-21 22:58:11 +00:00
</Target>
2018-12-19 20:53:08 +00:00
</Project>