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>
2020-09-17 17:05:22 +00:00
<PropertyGroup>
<PublishingVersion>3</PublishingVersion>
</PropertyGroup>
2018-12-19 20:53:08 +00:00
<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>
2020-07-15 20:32:28 +00:00
<!-- Pulled from arcade's publish.proj see https://github.com/dotnet/arcade/issues/5790 for
issue on making this common in arcade so it doesn't have to be duplicated here -->
<PropertyGroup>
<CollectionUri>$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)</CollectionUri>
<!-- When we have dev.azure.com/<account>/ -->
<AzureDevOpsAccount Condition="$(CollectionUri.IndexOf('dev.azure.com')) >= 0">$(CollectionUri.Split('/')[3])</AzureDevOpsAccount>
<!-- When we have <account>.visualstudio.com -->
<AzureDevOpsAccount Condition="$(CollectionUri.IndexOf('visualstudio.com')) >= 0">$(CollectionUri.Split('.')[0].Split('/')[2])</AzureDevOpsAccount>
</PropertyGroup>
<!--
The new Maestro/BAR build model keeps separate Azure DevOps and GitHub build information.
The GitHub information will be extracted based on the Azure DevOps repository.
-->
<ItemGroup>
<ManifestBuildData Include="InitialAssetsLocation=$(SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$(SYSTEM_TEAMPROJECT)/_apis/build/builds/$(BUILD_BUILDID)/artifacts" />
<ManifestBuildData Include="AzureDevOpsBuildId=$(BUILD_BUILDID)" />
<ManifestBuildData Include="AzureDevOpsBuildDefinitionId=$(SYSTEM_DEFINITIONID)" />
<ManifestBuildData Include="AzureDevOpsAccount=$(AzureDevOpsAccount)" />
<ManifestBuildData Include="AzureDevOpsProject=$(SYSTEM_TEAMPROJECT)" />
<ManifestBuildData Include="AzureDevOpsBuildNumber=$(BUILD_BUILDNUMBER)" />
<ManifestBuildData Include="AzureDevOpsRepository=$(BUILD_REPOSITORY_URI)" />
<ManifestBuildData Include="AzureDevOpsBranch=$(BUILD_SOURCEBRANCH)" />
</ItemGroup>
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
2020-08-03 19:18:09 +00:00
that exists in the container. Disambiguate the manifests via available properties.
AGENT_OS and AGENT_JOBNAME are present on Azure DevOps agents. AssetManifestOS will also
be used by arcade to generate the name of the manifest file name for the built in publishing. -->
<AssetManifestOS Condition="'$(AGENT_OS)' != ''">$(AGENT_OS)</AssetManifestOS>
<AssetManifestOS Condition="'$(AGENT_OS)' == ''">$(OS)</AssetManifestOS>
<AssetManifestOS Condition="'$(AGENT_JOBNAME)' != ''">$(AssetManifestOS)-$(AGENT_JOBNAME)</AssetManifestOS>
<BaseAssetManifestFileName>$(AssetManifestOS)</BaseAssetManifestFileName>
<BaseAssetManifestFileName Condition="'$(AGENT_JOBNAME)' == '' and '$(Architecture)' != ''">$(AssetManifestOS)-$(Architecture)</BaseAssetManifestFileName>
<InstallersAssetManifestFileName>$(BaseAssetManifestFileName)-installers</InstallersAssetManifestFileName>
<ChecksumsAssetManifestFileName>$(BaseAssetManifestFileName)-checksums</ChecksumsAssetManifestFileName>
<!-- Property AssetManifestFilePath would be reassigned by the Arcade SDK, so use a different name (InstallersAssetManifestFilePath) -->
<InstallersAssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(InstallersAssetManifestFileName).xml</InstallersAssetManifestFilePath>
2019-01-24 22:28:52 +00:00
<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-04-24 21:02:27 +00:00
<!-- Only publish this file from windows x64 so that we don't end up with duplicates -->
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productVersion.txt"
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64'" />
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" />
2020-06-25 18:36:38 +00:00
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
2020-06-30 16:13:04 +00:00
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.tar.gz" />
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.zip" />
2020-06-25 18:36:38 +00:00
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.pkg" />
2018-12-21 22:58:11 +00:00
<CheckSumsToPublish Include="$(ArtifactsShippingPackagesDir)*.sha" />
2020-04-24 21:02:27 +00:00
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.txt.sha" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productVersion.txt.sha" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
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>
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>
2018-12-20 00:08:49 +00:00
</ItemGroup>
2019-09-10 19:33:20 +00:00
<PushToAzureDevOpsArtifacts
2020-09-18 20:38:18 +00:00
ItemsToPush="@(SdkAssetsToPushToBlobFeed)"
2020-07-15 20:32:28 +00:00
ManifestBuildData="@(ManifestBuildData)"
2020-09-17 17:05:22 +00:00
ManifestRepoUri="$(BUILD_REPOSITORY_NAME)"
2018-12-21 22:58:11 +00:00
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
2020-08-03 19:18:09 +00:00
AssetManifestPath="$(InstallersAssetManifestFilePath)"
2020-09-17 17:05:22 +00:00
PublishFlatContainer="true"
PublishingVersion="3"/>
2018-12-21 22:58:11 +00:00
2019-09-10 19:33:20 +00:00
<PushToAzureDevOpsArtifacts
2020-09-18 20:38:18 +00:00
ItemsToPush="@(ChecksumsToPushToBlobFeed)"
2020-07-15 20:32:28 +00:00
ManifestBuildData="@(ManifestBuildData)"
2020-09-17 17:05:22 +00:00
ManifestRepoUri="$(BUILD_REPOSITORY_NAME)"
2018-12-21 22:58:11 +00:00
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
ManifestCommit="$(BUILD_SOURCEVERSION)"
2019-01-24 22:00:22 +00:00
AssetManifestPath="$(ChecksumsAssetManifestFilePath)"
2020-09-17 17:05:22 +00:00
PublishFlatContainer="true"
PublishingVersion="3"/>
2018-12-21 22:58:11 +00:00
</Target>
2018-12-19 20:53:08 +00:00
</Project>