|
| 1 | +<!-- |
| 2 | + This MSBuild file is intended to be used as the body of the default |
| 3 | + publishing release pipeline. The release pipeline will use this file |
| 4 | + to invoke the PushToStaticFeed task that will read the build asset |
| 5 | + manifest and publish the assets described in the manifest to |
| 6 | + informed target feeds. |
| 7 | +--> |
| 8 | +<Project Sdk="Microsoft.NET.Sdk"> |
| 9 | + <PropertyGroup> |
| 10 | + <TargetFramework>netcoreapp2.1</TargetFramework> |
| 11 | + </PropertyGroup> |
| 12 | + |
| 13 | + <Import Project="$(MSBuildThisFileDirectory)MicrosoftDotNetBuildTasksFeedVersion.props" /> |
| 14 | + <Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" /> |
| 15 | + |
| 16 | + <Target Name="PublishToFeed"> |
| 17 | + <Error Condition="'$(TargetStaticFeed)' == ''" Text="TargetStaticFeed: Target feed for publishing assets wasn't provided." /> |
| 18 | + <Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." /> |
| 19 | + <Error Condition="'$(FullPathAssetManifest)' == ''" Text="Full path to asset manifest wasn't provided." /> |
| 20 | + <Error Condition="'$(FullPathBlobBasePath)' == '' AND '$(FullPathPackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." /> |
| 21 | + |
| 22 | + <PushArtifactsInManifestToFeed |
| 23 | + ExpectedFeedUrl="$(TargetStaticFeed)" |
| 24 | + AccountKey="$(AccountKeyToStaticFeed)" |
| 25 | + Overwrite="$(OverrideAssetsWithSameName)" |
| 26 | + PassIfExistingItemIdentical="$(PassIfExistingItemIdentical)" |
| 27 | + MaxClients="$(MaxParallelUploads)" |
| 28 | + UploadTimeoutInMinutes="$(MaxUploadTimeoutInMinutes)" |
| 29 | + AssetManifestPath="$(FullPathAssetManifest)" |
| 30 | + BlobAssetsBasePath="$(FullPathBlobBasePath)" |
| 31 | + PackageAssetsBasePath="$(FullPathPackageBasePath)" /> |
| 32 | + </Target> |
| 33 | + |
| 34 | + <ItemGroup> |
| 35 | + <PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" /> |
| 36 | + </ItemGroup> |
| 37 | +</Project> |
0 commit comments