|
11 | 11 | </PropertyGroup>
|
12 | 12 |
|
13 | 13 | <Import Project="$(MSBuildThisFileDirectory)DefaultVersions.props" Condition="Exists('$(MSBuildThisFileDirectory)DefaultVersions.props')" />
|
| 14 | + |
| 15 | + <!-- |
| 16 | + This won't be necessary once we solve this issue: |
| 17 | + https://github.com/dotnet/arcade/issues/2266 |
| 18 | + --> |
| 19 | + <Import Project="$(MSBuildThisFileDirectory)ArtifactsCategory.props" Condition="Exists('$(MSBuildThisFileDirectory)ArtifactsCategory.props')" /> |
14 | 20 |
|
15 | 21 | <Import Project="$(NuGetPackageRoot)microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
|
16 | 22 |
|
17 | 23 | <Target Name="PublishToFeed">
|
18 |
| - <Error Condition="'$(TargetStaticFeed)' == ''" Text="TargetStaticFeed: Target feed for publishing assets wasn't provided." /> |
| 24 | + <Error Condition="'$(ArtifactsCategory)' == ''" Text="ArtifactsCategory: The artifacts' category produced by the build wasn't provided." /> |
19 | 25 | <Error Condition="'$(AccountKeyToStaticFeed)' == ''" Text="AccountKeyToStaticFeed: Account key for target feed wasn't provided." />
|
20 | 26 | <Error Condition="'$(ManifestsBasePath)' == ''" Text="Full path to asset manifests directory wasn't provided." />
|
21 | 27 | <Error Condition="'$(BlobBasePath)' == '' AND '$(PackageBasePath)' == ''" Text="A valid full path to BlobBasePath of PackageBasePath is required." />
|
|
26 | 32 | </ItemGroup>
|
27 | 33 |
|
28 | 34 | <Error Condition="'@(ManifestFiles)' == ''" Text="No manifest file was found in the provided path: $(ManifestsBasePath)" />
|
29 |
| - |
| 35 | + |
| 36 | + <!-- |
| 37 | + For now the type of packages being published will be informed for the whole build. |
| 38 | + Eventually this will be specified on a per package basis: |
| 39 | + TODO: https://github.com/dotnet/arcade/issues/2266 |
| 40 | + --> |
| 41 | + <PropertyGroup> |
| 42 | + <TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCORE'">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</TargetStaticFeed> |
| 43 | + <TargetStaticFeed Condition="'$(ArtifactsCategory.ToUpper())' == '.NETCOREVALIDATION'">https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json</TargetStaticFeed> |
| 44 | + </PropertyGroup> |
| 45 | + |
| 46 | + <Error |
| 47 | + Condition="'$(TargetStaticFeed)' == ''" |
| 48 | + Text="'$(ArtifactsCategory)' wasn't recognized as a valid artifact category. Valid categories are: '.NetCore' and '.NetCoreValidation'" /> |
| 49 | + |
30 | 50 | <!-- Iterate publishing assets from each manifest file. -->
|
31 | 51 | <PushArtifactsInManifestToFeed
|
32 | 52 | ExpectedFeedUrl="$(TargetStaticFeed)"
|
|
0 commit comments