summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19461.7/tools/SdkTasks/GenerateBuildManifest.proj
blob: 2df4402477a906b7875fd441513928353caed169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Execute">
  <!--
    Optional variables:
      AssetManifestFilePath      Output file path for manifest file
      PackagesToPublishPattern   Property to declare a file glob for selecting the files to be pushed. (eg. $(OutputPath)*.zip)
  -->
  <!-- Allow repos to define sdk task properties -->
  <Import Project="$(RepositoryEngineeringDir)GenerateBuildManifest.props" Condition="Exists('$(RepositoryEngineeringDir)GenerateBuildManifest.props')" />

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>

  <PropertyGroup>
    <AssetManifestFilePath Condition="'$(AssetManifestFilePath)' == ''">$(ArtifactsLogDir)AssetManifest\$(OS)-$(PlatformName).xml</AssetManifestFilePath>
  </PropertyGroup>
  
  <ItemGroup Condition="'$(PackagesToPublishPattern)' != ''">
    <ItemsToPush Remove="@(ItemsToPush)" />
    <ItemsToPush Include="$(PackagesToPublishPattern)" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="microsoft.dotnet.build.tasks.feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" GeneratePathProperty="true"/>
  </ItemGroup>
  <UsingTask TaskName="GenerateBuildManifest" AssemblyFile="$(PkgMicrosoft_DotNet_Build_Tasks_Feed)\tools\netcoreapp2.1\Microsoft.DotNet.Build.Tasks.Feed.dll" />

  <Target Name="Execute">
    <GenerateBuildManifest Artifacts="@(ItemsToPush)"
                           OutputPath="$(AssetManifestFilePath)"
                           BuildId="$(BUILD_BUILDNUMBER)"
                           BuildData="$(ManifestBuildData)"
                           RepoUri="$(BUILD_REPOSITORY_URI)"
                           RepoBranch="$(BUILD_SOURCEBRANCH)"
                           RepoCommit="$(BUILD_SOURCEVERSION)" />
  </Target>
</Project>