<commit_before><Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <UsingTask TaskName="CreateAzureContainer" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>
  <UsingTask TaskName="UploadToAzure" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>

  <PropertyGroup>
    <OverwriteOnPublish Condition="'$(OverwriteOnPublish)' == ''">false</OverwriteOnPublish>
  </PropertyGroup>

  <!-- gathers the items to be published -->
  <Target Name="GatherItemsForPattern">
    <Error Condition="'$(PublishPattern)' == ''" Text="Please specify a value for PublishPattern using standard msbuild 'include' syntax." />
    <ItemGroup>
      <ForPublishing Include="$(PublishPattern)" />
    </ItemGroup>
    <Error Condition="'@(ForPublishing)' == ''" Text="No items were found matching pattern '$(PublishPattern)'." />
  </Target>

  <!-- publishes items to blob storage in Azure -->
  <Target Name="UploadToAzure" DependsOnTargets="GatherItemsForPattern">
    <Error Condition="'$(ContainerName)' == ''" Text="Missing property ContainerName." />
    <Error Condition="'$(CloudDropAccountName)' == ''" Text="Missing property CloudDropAccountName." />
    <Error Condition="'$(CloudDropAccessToken)' == ''" Text="Missing property CloudDropAccessToken." />
    <!-- create the container if it doesn't exist -->
    <CreateAzureContainer
      AccountKey="$(CloudDropAccessToken)"
      AccountName="$(CloudDropAccountName)"
      ContainerName="$(ContainerName)" />
    <!-- add relative blob path metadata -->
    <ItemGroup>
      <ForPublishing>
        <RelativeBlobPath>$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> 
      </ForPublishing>
    </ItemGroup>
    <!-- now upload the items -->
    <UploadToAzure
      AccountKey="$(CloudDropAccessToken)"
      AccountName="$(CloudDropAccountName)"
      ContainerName="$(ContainerName)"<commit_msg>Reorganize PublishContent.targets so we can overwrite RelativeBlobPath (#762)<commit_after><Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <UsingTask TaskName="CreateAzureContainer" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>
  <UsingTask TaskName="UploadToAzure" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.CloudTestTasks.dll"/>

  <PropertyGroup>
    <OverwriteOnPublish Condition="'$(OverwriteOnPublish)' == ''">false</OverwriteOnPublish>
  </PropertyGroup>

  <!-- gathers the items to be published -->
  <Target Name="GatherItemsForPattern">
    <Error Condition="'$(PublishPattern)' == ''" Text="Please specify a value for PublishPattern using standard msbuild 'include' syntax." />
    <ItemGroup>
      <ForPublishing Include="$(PublishPattern)" />
    </ItemGroup>
    <!-- add relative blob path metadata -->
    <ItemGroup>
      <ForPublishing>
        <RelativeBlobPath>$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath> 
      </ForPublishing>
    </ItemGroup>
    <Error Condition="'@(ForPublishing)' == ''" Text="No items were found matching pattern '$(PublishPattern)'." />
  </Target>

  <!-- publishes items to blob storage in Azure -->
  <Target Name="UploadToAzure" DependsOnTargets="GatherItemsForPattern">
    <Error Condition="'$(ContainerName)' == ''" Text="Missing property ContainerName." />
    <Error Condition="'$(CloudDropAccountName)' == ''" Text="Missing property CloudDropAccountName." />
    <Error Condition="'$(CloudDropAccessToken)' == ''" Text="Missing property CloudDropAccessToken." />
    <!-- create the container if it doesn't exist -->
    <CreateAzureContainer
      AccountKey="$(CloudDropAccessToken)"
      AccountName="$(CloudDropAccountName)"
      ContainerName="$(ContainerName)" />
    <!-- now upload the items -->
    <UploadToAzure
      AccountKey="$(CloudDropAccessToken)"
      AccountName="$(CloudDropAccountName)"
      ContainerName="$(ContainerName)"
{'fraction_non_alphanumeric': 0.16272189349112426, 'fraction_numerical': 0.004191321499013806, 'mean_word_length': 4.939970717423133, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5713930', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1046, 'n_words': 214}