<commit_before><Project ToolsVersion="12.0" DefaultTargets="PublishOutputLeg" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--
    Required properties:

    ExpectedFeedUrl - This is the full URL to the index.json file for the blob feed.
    AccountKey - This is the access token used to gain write access to the blob feed.

    Optional properties:

    PushToBlobFeed_Overwrite - Set to true if you want to allow overrriting of existing files or packages. Defaults to 'false'.
    PushToBlobFeed_MaxClients - Number of clients to push in parallel.

    FileRelativePathBase - The base relative path from the blob feed root for any files uploaded. Defaults to 'assets'.

    Selecting packages for publish:

    PackagesToPublishPattern - Property to declare a file glob for selecting the packages to be pushed. (eg. $(PackageOutput)*.nupkg)
    PackagesToPublish - Item group that contains a list of packages to be pushed, if glob isn't enough.

    Selecting files for publish:

    FilesToPublishPattern - Property to declare a file glob for selecting the files to be pushed. (eg. $(OutputPath)*.zip)
    FilesToPublish - Item group that contains a list of files to be pushed, if glob isn't enough.
    %(RelativeBlobPath) - Metadata that can be put on file items to control the relative path where the file
    goes underneath the blob feed. If not specfied it is default based on the FileRelativePathBase
  -->

  <PropertyGroup>
    <_TaskDir>$(MSBuildThisFileDirectory)net46/</_TaskDir>
    <_TaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)netstandard1.5/</_TaskDir>
  </PropertyGroup>
  <UsingTask TaskName="ConfigureInputFeeds" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="CopyBlobDirectory" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="GetBlobFeedPackageList" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="ParseFeedUrl" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="PushOrchestratedBuildManifest" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="PushToBlobFeed" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="WriteOrchestratedBuildManifestToFile" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>

  <PropertyGroup>
    <PushToBlobFeed_Overwrite Condition="'$(PushToBlobFeed_Overwrite)' == ''">false</PushToBlobFeed_Overwrite>
    <PushToBlobFeed_MaxClients Condition="'$(PushToBlobFeed_MaxClients)' == ''">8</PushToBlobFeed_MaxClients>
    <FileRelativePathBase Condition="'$(FileRelativePathBase)' == ''">assets</FileRelativePathBase>
    <FileRelativePathBase Condition="!HasTrailingSlash('$(FileRelativePathBase)')">$(FileRelativePathBase)/</FileRelativePathBase>
  </PropertyGroup>


  <Target Name="PublishPackagesToBlobFeed" DependsOnTargets="@(PublishPackagesToBlobFeedDependsOn)" >
    <Error Text="The ExpectedFeedUrl  property must be set on the command line."
          Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set on the command line."
          Condition="'$(AccountKey)' == ''" />

    <ItemGroup>
      <_ItemsToPush Remove="@(_ItemsToPush)" />
      <_ItemsToPush Condition="'$(PackagesToPublishPattern)' != ''" Include="$(PackagesToPublishPattern)" />
      <_ItemsToPush Include="@(PackagesToPublish)" />
    </ItemGroup>

    <Error Condition="'@(_ItemsToPush)' == ''" Text="No packages to push." />

    <PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
                    AccountKey="$(AccountKey)"
                    ItemsToPush="@(_ItemsToPush)"
                    Overwrite="$(PushToBlobFeed_Overwrite)"
                    MaxClients="$(PushToBlobFeed_MaxClients)" />
  </Target>

  <Target Name="PublishFilesToBlobFeed">
    <Error Text="The ExpectedFeedUrl  property must be set on the command line."
          Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set on the command line."
          Condition="'$(AccountKey)' == ''" />

    <ItemGroup>
      <_ItemsToPush Remove="@(_ItemsToPush)" />
      <_ItemsToPush Condition="'$(FilesToPublishPattern)' != ''" Include="$(FilesToPublishPattern)" />
      <_ItemsToPush Include="@(FilesToPublish)" />
      <_ItemsToPush>
        <RelativeBlobPath Condition="'%(_ItemsToPush.RelativeBlobPath)' == ''">$(FileRelativePathBase)$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
      </_ItemsToPush>
    </ItemGroup>

    <Error Condition="'@(_ItemsToPush)' == ''" Text="No files to push." />

    <PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
                    AccountKey="$(AccountKey)"
                    ItemsToPush="@(_ItemsToPush)"
                    PublishFlatContainer="true"
                    Overwrite="$(PushToBlobFeed_Overwrite)"
                    MaxClients="$(PushToBlobFeed_MaxClients)" />

  </Target>

  <Target Name="CreateFeedOrchestratedBuildManifest">
    <Error Text="The ExpectedFeedUrl property must be set." Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set." Condition="'$(AccountKey)' == ''" />
    <Error Text="The ManifestName property must be set." Condition="'$(ManifestName)' == ''" />
    <Error Text="The ManifestBuildId property must be set." Condition="'$(ManifestBuildId)' == ''" />

    <PropertyGroup>
      <ManifestTempDir Condition="'$(ManifestTempDir)' == ''">$(BaseIntermediateOutputPath)manifest-temp/</ManifestTempDir>
      <ManifestDownloadDir Condition="'$(ManifestDownloadDir)' == ''">$(ManifestTempDir)downloads/</ManifestDownloadDir>
      <ManifestFile Condition="'$(ManifestFile)' == ''">$(ManifestTempDir)build.xml</ManifestFile>
    </PropertyGroup>

    <ParseFeedUrl FeedUrl="$(ExpectedFeedUrl)">
      <Output TaskParameter="BlobElements" ItemName="ParsedFeedUrl" />
    </ParseFeedUrl>

    <DownloadFromAzure AccountName="%(ParsedFeedUrl.AccountName)"
                       AccountKey="$(AccountKey)"
                       ContainerName="%(ParsedFeedUrl.ContainerName)"
                       BlobNameExtension=".xml"
                       BlobNamePrefix="%(ParsedFeedUrl.BaseBlobPath)/assets/orchestration-metadata/manifests/"
                       DownloadDirectory="$(ManifestDownloadDir)"
                       DownloadFlatFiles="true" />

    <ItemGroup>
      <BuildManifests Include="$(ManifestDownloadDir)*.xml" />
    </ItemGroup>

    <WriteOrchestratedBuildManifestToFile File="$(ManifestFile)"
                                          BlobFeedUrl="$(ExpectedFeedUrl)"
                                          BuildManifestFiles="@(BuildManifests)"
                                          ManifestName="$(ManifestName)"
                                          ManifestBuildId="$(ManifestBuildId)" />
  </Target>

  <!--
    Create an orchestrated build manifest based on the build output manifests uploaded to a feed,
    then push that manifest to the dotnet/versions repo by default.
  -->
  <Target Name="PushFeedOrchestratedBuildManifest"
          DependsOnTargets="CreateFeedOrchestratedBuildManifest">
    <Error Text="The VersionsRepoPath property must be set." Condition="'$(VersionsRepoPath)' == ''" />
    <Error Text="The GitHubAuthToken property must be set." Condition="'$(GitHubAuthToken)' == ''" />
    <Error Text="The GitHubUser property must be set." Condition="'$(GitHubUser)' == ''" />
    <Error Text="The GitHubEmail property must be set." Condition="'$(GitHubEmail)' == ''" />

    <PropertyGroup>
      <VersionsRepo Condition="'$(VersionsRepo)' == ''">versions</VersionsRepo>
      <VersionsRepoOwner Condition="'$(VersionsRepoOwner)' == ''">dotnet</VersionsRepoOwner>
      <VersionsRepoBranch Condition="'$(VersionsRepoBranch)' == ''">master</VersionsRepoBranch>
    </PropertyGroup>

    <PushOrchestratedBuildManifest ManifestFile="$(ManifestFile)"
                                   VersionsRepoPath="$(VersionsRepoPath)"
                                   GitHubAuthToken="$(GitHubAuthToken)"
                                   GitHubUser="$(GitHubUser)"
                                   GitHubEmail="$(GitHubEmail)"
                                   VersionsRepo="$(VersionsRepo)"
                                   VersionsRepoOwner="$(VersionsRepoOwner)"
                                   VersionsRepoBranch="$(VersionsRepoBranch)"
                                   CommitMessage="$(CommitMessage)" />

  </Target>

</Project><commit_msg>Include manifest info properties in feed targets (#1852)<commit_after><Project ToolsVersion="12.0" DefaultTargets="PublishOutputLeg" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!--
    Required properties:

    ExpectedFeedUrl - This is the full URL to the index.json file for the blob feed.
    AccountKey - This is the access token used to gain write access to the blob feed.

    Optional properties:

    PushToBlobFeed_Overwrite - Set to true if you want to allow overrriting of existing files or packages. Defaults to 'false'.
    PushToBlobFeed_MaxClients - Number of clients to push in parallel.

    FileRelativePathBase - The base relative path from the blob feed root for any files uploaded. Defaults to 'assets'.

    Selecting packages for publish:

    PackagesToPublishPattern - Property to declare a file glob for selecting the packages to be pushed. (eg. $(PackageOutput)*.nupkg)
    PackagesToPublish - Item group that contains a list of packages to be pushed, if glob isn't enough.

    Selecting files for publish:

    FilesToPublishPattern - Property to declare a file glob for selecting the files to be pushed. (eg. $(OutputPath)*.zip)
    FilesToPublish - Item group that contains a list of files to be pushed, if glob isn't enough.
    %(RelativeBlobPath) - Metadata that can be put on file items to control the relative path where the file
    goes underneath the blob feed. If not specfied it is default based on the FileRelativePathBase

    Specifying build output manifest values:

    ManifestName - The repository name, listed inside the manifest and used to name the file.
      If $(GitHubRepositoryName) is defined, its value is used. Default: "anonymous"
    ManifestBuildId - Build ID listed in the manifest. Default: "no build id provided"
    ManifestBranch - Branch listed in the manifest. Default: none
    ManifestCommit - Commit listed in the manifest. Default: none
    SkipCreateManifest - If 'true', no manifest is written even if the blob feed allows them.
      Default: false
  -->

  <PropertyGroup>
    <_TaskDir>$(MSBuildThisFileDirectory)net46/</_TaskDir>
    <_TaskDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)netstandard1.5/</_TaskDir>
  </PropertyGroup>
  <UsingTask TaskName="ConfigureInputFeeds" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="CopyBlobDirectory" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="GetBlobFeedPackageList" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="ParseFeedUrl" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="PushOrchestratedBuildManifest" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="PushToBlobFeed" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>
  <UsingTask TaskName="WriteOrchestratedBuildManifestToFile" AssemblyFile="$(_TaskDir)Microsoft.DotNet.Build.Tasks.Feed.dll"/>

  <PropertyGroup>
    <PushToBlobFeed_Overwrite Condition="'$(PushToBlobFeed_Overwrite)' == ''">false</PushToBlobFeed_Overwrite>
    <PushToBlobFeed_MaxClients Condition="'$(PushToBlobFeed_MaxClients)' == ''">8</PushToBlobFeed_MaxClients>
    <FileRelativePathBase Condition="'$(FileRelativePathBase)' == ''">assets</FileRelativePathBase>
    <FileRelativePathBase Condition="!HasTrailingSlash('$(FileRelativePathBase)')">$(FileRelativePathBase)/</FileRelativePathBase>
    <ManifestName Condition="'$(ManifestName)' == ''">$(GitHubRepositoryName)</ManifestName>
  </PropertyGroup>


  <Target Name="PublishPackagesToBlobFeed" DependsOnTargets="@(PublishPackagesToBlobFeedDependsOn)" >
    <Error Text="The ExpectedFeedUrl  property must be set on the command line."
          Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set on the command line."
          Condition="'$(AccountKey)' == ''" />

    <ItemGroup>
      <_ItemsToPush Remove="@(_ItemsToPush)" />
      <_ItemsToPush Condition="'$(PackagesToPublishPattern)' != ''" Include="$(PackagesToPublishPattern)" />
      <_ItemsToPush Include="@(PackagesToPublish)" />
    </ItemGroup>

    <Error Condition="'@(_ItemsToPush)' == ''" Text="No packages to push." />

    <PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
                    AccountKey="$(AccountKey)"
                    ItemsToPush="@(_ItemsToPush)"
                    Overwrite="$(PushToBlobFeed_Overwrite)"
                    MaxClients="$(PushToBlobFeed_MaxClients)"
                    ManifestName="$(ManifestName)"
                    ManifestBuildId="$(ManifestBuildId)"
                    ManifestBranch="$(ManifestBranch)"
                    ManifestCommit="$(ManifestCommit)"
                    SkipCreateManifest="$(SkipCreateManifest)" />
  </Target>

  <Target Name="PublishFilesToBlobFeed">
    <Error Text="The ExpectedFeedUrl  property must be set on the command line."
          Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set on the command line."
          Condition="'$(AccountKey)' == ''" />

    <ItemGroup>
      <_ItemsToPush Remove="@(_ItemsToPush)" />
      <_ItemsToPush Condition="'$(FilesToPublishPattern)' != ''" Include="$(FilesToPublishPattern)" />
      <_ItemsToPush Include="@(FilesToPublish)" />
      <_ItemsToPush>
        <RelativeBlobPath Condition="'%(_ItemsToPush.RelativeBlobPath)' == ''">$(FileRelativePathBase)$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
      </_ItemsToPush>
    </ItemGroup>

    <Error Condition="'@(_ItemsToPush)' == ''" Text="No files to push." />

    <PushToBlobFeed ExpectedFeedUrl="$(ExpectedFeedUrl)"
                    AccountKey="$(AccountKey)"
                    ItemsToPush="@(_ItemsToPush)"
                    PublishFlatContainer="true"
                    Overwrite="$(PushToBlobFeed_Overwrite)"
                    MaxClients="$(PushToBlobFeed_MaxClients)"
                    ManifestName="$(ManifestName)"
                    ManifestBuildId="$(ManifestBuildId)"
                    ManifestBranch="$(ManifestBranch)"
                    ManifestCommit="$(ManifestCommit)"
                    SkipCreateManifest="$(SkipCreateManifest)" />

  </Target>

  <Target Name="CreateFeedOrchestratedBuildManifest">
    <Error Text="The ExpectedFeedUrl property must be set." Condition="'$(ExpectedFeedUrl)' == ''" />
    <Error Text="The AccountKey property must be set." Condition="'$(AccountKey)' == ''" />
    <Error Text="The ManifestName property must be set." Condition="'$(ManifestName)' == ''" />
    <Error Text="The ManifestBuildId property must be set." Condition="'$(ManifestBuildId)' == ''" />

    <PropertyGroup>
      <ManifestTempDir Condition="'$(ManifestTempDir)' == ''">$(BaseIntermediateOutputPath)manifest-temp/</ManifestTempDir>
      <ManifestDownloadDir Condition="'$(ManifestDownloadDir)' == ''">$(ManifestTempDir)downloads/</ManifestDownloadDir>
      <ManifestFile Condition="'$(ManifestFile)' == ''">$(ManifestTempDir)build.xml</ManifestFile>
    </PropertyGroup>

    <ParseFeedUrl FeedUrl="$(ExpectedFeedUrl)">
      <Output TaskParameter="BlobElements" ItemName="ParsedFeedUrl" />
    </ParseFeedUrl>

    <DownloadFromAzure AccountName="%(ParsedFeedUrl.AccountName)"
                       AccountKey="$(AccountKey)"
                       ContainerName="%(ParsedFeedUrl.ContainerName)"
                       BlobNameExtension=".xml"
                       BlobNamePrefix="%(ParsedFeedUrl.BaseBlobPath)/assets/orchestration-metadata/manifests/"
                       DownloadDirectory="$(ManifestDownloadDir)"
                       DownloadFlatFiles="true" />

    <ItemGroup>
      <BuildManifests Include="$(ManifestDownloadDir)*.xml" />
    </ItemGroup>

    <WriteOrchestratedBuildManifestToFile File="$(ManifestFile)"
                                          BlobFeedUrl="$(ExpectedFeedUrl)"
                                          BuildManifestFiles="@(BuildManifests)"
                                          ManifestName="$(ManifestName)"
                                          ManifestBuildId="$(ManifestBuildId)" />
  </Target>

  <!--
    Create an orchestrated build manifest based on the build output manifests uploaded to a feed,
    then push that manifest to the dotnet/versions repo by default.
  -->
  <Target Name="PushFeedOrchestratedBuildManifest"
          DependsOnTargets="CreateFeedOrchestratedBuildManifest">
    <Error Text="The VersionsRepoPath property must be set." Condition="'$(VersionsRepoPath)' == ''" />
    <Error Text="The GitHubAuthToken property must be set." Condition="'$(GitHubAuthToken)' == ''" />
    <Error Text="The GitHubUser property must be set." Condition="'$(GitHubUser)' == ''" />
    <Error Text="The GitHubEmail property must be set." Condition="'$(GitHubEmail)' == ''" />

    <PropertyGroup>
      <VersionsRepo Condition="'$(VersionsRepo)' == ''">versions</VersionsRepo>
      <VersionsRepoOwner Condition="'$(VersionsRepoOwner)' == ''">dotnet</VersionsRepoOwner>
      <VersionsRepoBranch Condition="'$(VersionsRepoBranch)' == ''">master</VersionsRepoBranch>
    </PropertyGroup>

    <PushOrchestratedBuildManifest ManifestFile="$(ManifestFile)"
                                   VersionsRepoPath="$(VersionsRepoPath)"
                                   GitHubAuthToken="$(GitHubAuthToken)"
                                   GitHubUser="$(GitHubUser)"
                                   GitHubEmail="$(GitHubEmail)"
                                   VersionsRepo="$(VersionsRepo)"
                                   VersionsRepoOwner="$(VersionsRepoOwner)"
                                   VersionsRepoBranch="$(VersionsRepoBranch)"
                                   CommitMessage="$(CommitMessage)" />

  </Target>

</Project>
{'fraction_non_alphanumeric': 0.1292677689499678, 'fraction_numerical': 0.001503113592441486, 'mean_word_length': 3.3627634660421544, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 185, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 50, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2566720', 'n_tokens_mistral': 5075, 'n_tokens_neox': 4756, 'n_words': 1054}