<commit_before><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="GenerateDebRepoUploadJsonFile" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
  <UsingTask TaskName="GenerateChecksums" AssemblyFile="$(LocalBuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.Local.dll" />

  <Target Name="GatherPublishToAzureBinaries">
    <ItemGroup>
      <PublishFile Include="@(CompressedFile)" />
      <PublishFile Include="@(RuntimePackageFile)" />
      <PublishFile Condition="'$(PublishRidAgnosticPackages)' == 'true'" Include="@(RidAgnosticPackageFile)" />
      <Project Include="publish.proj">
        <PublishTarget>UploadToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(PublishFile);$(OutputVersionBadge);RelativeBlobPath=$(BinariesRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>

  <Target Name="GatherPublishToAzureInstallers">
    <ItemGroup>
      <Project Include="publish.proj">
        <PublishTarget>UploadToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(InstallerFile);RelativeBlobPath=$(InstallersRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>
  
  <Target Name="GatherPublishToAzureChecksums" DependsOnTargets="CreateChecksums" >
    <ItemGroup>
      <ChecksumItems Include="$(PackagesOutDir)**/*$(ChecksumExtension)" />
      <Project Include="publish.proj">
        <PublishTarget>UploadChecksumsToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(ChecksumItems);RelativeBlobPath=$(ChecksumsRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>
  
  <Target Name="CreateChecksums">
    <ItemGroup>
      <ItemsToChecksum Include="@(CompressedFile)" />
      <ItemsToChecksum Include="@(InstallerFile)" />
      <ArtifactsForGeneratingChecksums Include="@(ItemsToChecksum)">
        <DestinationPath>%(ItemsToChecksum.FullPath)$(ChecksumExtension)</DestinationPath>
      </ArtifactsForGeneratingChecksums>
    </ItemGroup>
    <GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
  </Target>

  <Target Name="GenerateDebRepoFiles"
          Condition="('$(TargetsUbuntu)' == 'true' or '$(TargetsDebian)' == 'true') and '$(TargetArchitecture)' == 'x64'">
          
    <ItemGroup>
      <RepoIds Include="DebianId_ubuntu1404-x64">
        <Key>$(DebianId_ubuntu1404-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_debian8-x64">
        <Key>$(DebianId_debian8-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_ubuntu1604-x64">
        <Key>$(DebianId_ubuntu1604-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_ubuntu1610-x64">
        <Key>$(DebianId_ubuntu1610-x64)</Key>
      </RepoIds>
    </ItemGroup>
    <PropertyGroup>
      <RidWithoutDots>$([System.String]::Copy($(DistroRid)).Replace('.', ''))</RidWithoutDots>
      <DebRepoId Condition="$([System.String]::Copy(%(RepoIds.Identity)).EndsWith('$(RidWithoutDots)'))">%(RepoIds.Key)</DebRepoId>
    </PropertyGroup>
    <Error Condition="'$(DebRepoId)'=='' OR '$(DebRepoUser)'=='' OR '$(DebRepoPass)'=='' OR '$(DebRepoServer)'==''"
           Text=" Missing parameters for debian publish." />
           
    <ItemGroup>
      <DebInstallerFile Include="$(SharedHostInstallerStart)$(ProductMoniker).deb" >
        <PackageName>dotnet-host</PackageName>
      </DebInstallerFile>
      <DebInstallerFile Include="$(HostFxrInstallerStart)$(HostResolverVersionMoniker).deb" >
        <PackageName>dotnet-hostfxr-$(HostResolverVersion)</PackageName>
      </DebInstallerFile>
      <DebInstallerFile Include="$(SharedFrameworkInstallerStart)$(ProductMoniker).deb">
        <PackageName>dotnet-sharedframework-$(SharedFrameworkName)-$(SharedFrameworkNugetVersion)</PackageName>
      </DebInstallerFile>

      <DebInstallerFile>
        <UploadJsonFilename>$(PackagesOutDir)%(PackageName)_package_upload.json</UploadJsonFilename>
      </DebInstallerFile>
    </ItemGroup>

    <GenerateDebRepoUploadJsonFile RepoId="$(DebRepoId)"
                                   UploadJsonFilename="%(DebInstallerFile.UploadJsonFilename)"
                                   PackageName="%(DebInstallerFile.PackageName)"
                                   PackageVersion="$(SharedFrameworkNugetVersion)"
                                   UploadUrl="$(BaseUrl)$(ContainerName)/$(Channel)/Installers/$(SharedFrameworkNugetVersion)/%(DebInstallerFile.Filename)%(DebInstallerFile.Extension)" />
  </Target>

  <Target Name="CheckIfAllBuildsHavePublished">
    <GetAzureBlobList AccountName="$(AzureAccountName)"
                      AccountKey="$(AzureAccessToken)"
                      ContainerName="$(ContainerName)"
                      FilterBlobNames="Runtime/$(SharedFrameworkNugetVersion)/">
      <Output TaskParameter="BlobNames" ItemName="_BlobNames" />
    </GetAzureBlobList>
    <ItemGroup>
      <_FoundBlobNames Include="%(_BlobNames.FileName)%(_BlobNames.Extension)" Condition="'%(_BlobNames.Extension)' == '.svg'" />
      <_MissingBlobNames Include="@(PublishRid->'sharedfx_%(Identity)_$(ConfigurationGroup)_version_badge.svg')" 
                         Exclude="@(_FoundBlobNames)" />
    </ItemGroup>
    <Error Text="Missing publish output from all legs of the build. Missing blobs are '@(_MissingBlobNames)'"
           Condition="'@(_MissingBlobNames)' != ''" />
  </Target>

  <Import Project="..\dir.targets" />
</Project><commit_msg>Fix casing of package name in generated deb json<commit_after><?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <UsingTask TaskName="GenerateDebRepoUploadJsonFile" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
  <UsingTask TaskName="GenerateChecksums" AssemblyFile="$(LocalBuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.Local.dll" />

  <Target Name="GatherPublishToAzureBinaries">
    <ItemGroup>
      <PublishFile Include="@(CompressedFile)" />
      <PublishFile Include="@(RuntimePackageFile)" />
      <PublishFile Condition="'$(PublishRidAgnosticPackages)' == 'true'" Include="@(RidAgnosticPackageFile)" />
      <Project Include="publish.proj">
        <PublishTarget>UploadToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(PublishFile);$(OutputVersionBadge);RelativeBlobPath=$(BinariesRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>

  <Target Name="GatherPublishToAzureInstallers">
    <ItemGroup>
      <Project Include="publish.proj">
        <PublishTarget>UploadToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(InstallerFile);RelativeBlobPath=$(InstallersRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>
  
  <Target Name="GatherPublishToAzureChecksums" DependsOnTargets="CreateChecksums" >
    <ItemGroup>
      <ChecksumItems Include="$(PackagesOutDir)**/*$(ChecksumExtension)" />
      <Project Include="publish.proj">
        <PublishTarget>UploadChecksumsToAzure</PublishTarget>
        <AdditionalProperties>%(Project.AdditionalProperties);ItemsToPublish=@(ChecksumItems);RelativeBlobPath=$(ChecksumsRelativePath)</AdditionalProperties>
      </Project>
    </ItemGroup>
  </Target>
  
  <Target Name="CreateChecksums">
    <ItemGroup>
      <ItemsToChecksum Include="@(CompressedFile)" />
      <ItemsToChecksum Include="@(InstallerFile)" />
      <ArtifactsForGeneratingChecksums Include="@(ItemsToChecksum)">
        <DestinationPath>%(ItemsToChecksum.FullPath)$(ChecksumExtension)</DestinationPath>
      </ArtifactsForGeneratingChecksums>
    </ItemGroup>
    <GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
  </Target>

  <Target Name="GenerateDebRepoFiles"
          Condition="('$(TargetsUbuntu)' == 'true' or '$(TargetsDebian)' == 'true') and '$(TargetArchitecture)' == 'x64'">
          
    <ItemGroup>
      <RepoIds Include="DebianId_ubuntu1404-x64">
        <Key>$(DebianId_ubuntu1404-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_debian8-x64">
        <Key>$(DebianId_debian8-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_ubuntu1604-x64">
        <Key>$(DebianId_ubuntu1604-x64)</Key>
      </RepoIds>
      <RepoIds Include="DebianId_ubuntu1610-x64">
        <Key>$(DebianId_ubuntu1610-x64)</Key>
      </RepoIds>
    </ItemGroup>
    <PropertyGroup>
      <RidWithoutDots>$([System.String]::Copy($(DistroRid)).Replace('.', ''))</RidWithoutDots>
      <DebRepoId Condition="$([System.String]::Copy(%(RepoIds.Identity)).EndsWith('$(RidWithoutDots)'))">%(RepoIds.Key)</DebRepoId>
    </PropertyGroup>
    <Error Condition="'$(DebRepoId)'=='' OR '$(DebRepoUser)'=='' OR '$(DebRepoPass)'=='' OR '$(DebRepoServer)'==''"
           Text=" Missing parameters for debian publish." />
           
    <ItemGroup>
      <DebInstallerFile Include="$(SharedHostInstallerStart)$(ProductMoniker).deb" >
        <PackageName>dotnet-host</PackageName>
      </DebInstallerFile>
      <DebInstallerFile Include="$(HostFxrInstallerStart)$(HostResolverVersionMoniker).deb" >
        <PackageName>dotnet-hostfxr-$(HostResolverVersion.ToLower())</PackageName>
      </DebInstallerFile>
      <DebInstallerFile Include="$(SharedFrameworkInstallerStart)$(ProductMoniker).deb">
        <PackageName>dotnet-sharedframework-$(SharedFrameworkName.ToLower())-$(SharedFrameworkNugetVersion.ToLower())</PackageName>
      </DebInstallerFile>

      <DebInstallerFile>
        <UploadJsonFilename>$(PackagesOutDir)%(PackageName)_package_upload.json</UploadJsonFilename>
      </DebInstallerFile>
    </ItemGroup>

    <GenerateDebRepoUploadJsonFile RepoId="$(DebRepoId)"
                                   UploadJsonFilename="%(DebInstallerFile.UploadJsonFilename)"
                                   PackageName="%(DebInstallerFile.PackageName)"
                                   PackageVersion="$(SharedFrameworkNugetVersion)"
                                   UploadUrl="$(BaseUrl)$(ContainerName)/$(Channel)/Installers/$(SharedFrameworkNugetVersion)/%(DebInstallerFile.Filename)%(DebInstallerFile.Extension)" />
  </Target>

  <Target Name="CheckIfAllBuildsHavePublished">
    <GetAzureBlobList AccountName="$(AzureAccountName)"
                      AccountKey="$(AzureAccessToken)"
                      ContainerName="$(ContainerName)"
                      FilterBlobNames="Runtime/$(SharedFrameworkNugetVersion)/">
      <Output TaskParameter="BlobNames" ItemName="_BlobNames" />
    </GetAzureBlobList>
    <ItemGroup>
      <_FoundBlobNames Include="%(_BlobNames.FileName)%(_BlobNames.Extension)" Condition="'%(_BlobNames.Extension)' == '.svg'" />
      <_MissingBlobNames Include="@(PublishRid->'sharedfx_%(Identity)_$(ConfigurationGroup)_version_badge.svg')" 
                         Exclude="@(_FoundBlobNames)" />
    </ItemGroup>
    <Error Text="Missing publish output from all legs of the build. Missing blobs are '@(_MissingBlobNames)'"
           Condition="'@(_MissingBlobNames)' != ''" />
  </Target>

  <Import Project="..\dir.targets" />
</Project>
{'fraction_non_alphanumeric': 0.15116381203337725, 'fraction_numerical': 0.009486166007905139, 'mean_word_length': 4.208600182982616, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 2, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '725100', 'n_tokens_mistral': 3579, 'n_tokens_neox': 3241, 'n_words': 367}