summaryrefslogtreecommitdiff
path: root/src/publishwitharcade.proj
diff options
context:
space:
mode:
Diffstat (limited to 'src/publishwitharcade.proj')
-rw-r--r--src/publishwitharcade.proj65
1 files changed, 52 insertions, 13 deletions
diff --git a/src/publishwitharcade.proj b/src/publishwitharcade.proj
index 01bc997288..a90570c0f5 100644
--- a/src/publishwitharcade.proj
+++ b/src/publishwitharcade.proj
@@ -1,37 +1,76 @@
-<Project DefaultTargets="PublishProductPackages" Sdk="Microsoft.DotNet.Arcade.Sdk">
+<Project DefaultTargets="PublishPackages">
<!-- TODO: move properties imported from here into a common props file -->
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <!-- Use an explicit SDK import so that arcade uses the build
+ configuration computed in dir.common.props. -->
+ <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
+
<Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
+ <PropertyGroup>
+ <!-- Set the TargetFramework just to make the SDK happy -->
+ <TargetFramework>net462</TargetFramework>
+ </PropertyGroup>
+
<Target Name="PublishPackages">
<ItemGroup>
- <ItemsToPush Remove="*.nupkg" />
- <ItemsToPush Include="$(PackagesBinDir)pkg\*.nupkg">
- <ManifestArtifactData>NonShipping=true</ManifestArtifactData> <!-- TODO: how is this metadata used? -->
- </ItemsToPush>
+ <PackagesToPublish Include="$(PackagesBinDir)pkg\*.nupkg" IsShipping="true" />
+ </ItemGroup>
+
+ <!-- Managed-only packages are built on each windows leg, but we
+ only want to upload them once. Let's arbitrarily upload these
+ only from the x64 leg. -->
+ <ItemGroup Condition=" '$(BuildArch)' != 'x64' ">
+ <PackagesToPublish Remove="$(PackagesBinDir)pkg\Microsoft.NET.Sdk.IL*.nupkg" />
+ <PackagesToPublish Remove="$(PackagesBinDir)pkg\Microsoft.TargetingPack.Private.CoreCLR*.nupkg" />
+ </ItemGroup>
+
+ <!-- TODO: Investigate whether we can get rid of the transport
+ packages entirely. For now, just exclude them from
+ publishing. -->
+ <ItemGroup>
+ <PackagesToPublish Remove="$(PackagesBinDir)pkg\transport*.nupkg" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ItemsToPushToBlobFeed Include="@(PackagesToPublish)">
+ <ManifestArtifactData Condition="!%(IsShipping)">NonShipping=true</ManifestArtifactData> <!-- TODO: how is this metadata used? -->
+ </ItemsToPushToBlobFeed>
</ItemGroup>
<Error Condition=" '$(AzureFeedUrl)' == '' " Text="AzureFeedUrl must be set" />
- <Error Condition=" '$(AccountKey)' == '' " Text="AccountKey must be set" />
+ <Error Condition=" '$(AzureAccountKey)' == '' " Text="AzureAccountKey must be set" />
<Error Condition=" '$(BUILD_REPOSITORY_URI)' == '' " Text="BUILD_REPOSITORY_URI must be set" />
<Error Condition=" '$(BUILD_SOURCEBRANCH)' == '' " Text="BUILD_SOURCEBRANCH must be set" />
<Error Condition=" '$(BUILD_BUILDNUMBER)' == '' " Text="BUILD_BUILDNUMBER must be set" />
<Error Condition=" '$(BUILD_SOURCEVERSION)' == '' " Text="BUILD_SOURCEVERSION must be set" />
+
+ <PropertyGroup>
+ <AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(OSIdentifier)-$(BuildArch)</AssetManifestFilePath>
+ <!-- Work around an issue where the repo URI is different on
+ OSX, causing the manifests to have different headers, which
+ makes publishing to BAR fail later when it tries to merge
+ the manifests. -->
+ <_TemporaryBuildRepositoryUri>$(BUILD_REPOSITORY_URI)</_TemporaryBuildRepositoryUri>
+ <_TemporaryBuildRepositoryUri Condition="'$(BUILD_REPOSITORY_URI)' == 'https://dnceng.visualstudio.com/internal/_git/dotnet-coreclr'" >https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-coreclr</_TemporaryBuildRepositoryUri>
+ </PropertyGroup>
+
+ <Message Importance="High" Text="BUILD_REPOSITORY_URI: $(BUILD_REPOSITORY_URI)" />
+ <Message Importance="High" Text="_TemporaryBuildRepositoryUri: $(_TemporaryBuildRepositoryUri)" />
+
<PushToBlobFeed ExpectedFeedUrl="$(AzureFeedUrl)"
- AccountKey="$(AccountKey)"
- ItemsToPush="@(ItemsToPush)"
+ AccountKey="$(AzureAccountKey)"
+ ItemsToPush="@(ItemsToPushToBlobFeed)"
ManifestBuildData="Location=$(AzureFeedUrl)"
- ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
+ ManifestRepoUri="$(_TemporaryBuildRepositoryUri)"
ManifestBranch="$(BUILD_SOURCEBRANCH)"
ManifestBuildId="$(BUILD_BUILDNUMBER)"
- ManifestCommit="$(BUILD_SOURCEVERSION)" />
- <!-- TODO: The arcade sample publishes an asset manifest. Do we want this?
- AssetManifestPath="" />
- -->
+ ManifestCommit="$(BUILD_SOURCEVERSION)"
+ AssetManifestPath="$(AssetManifestFilePath)" />
</Target>
</Project>