<commit_before>﻿<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

    <NuSpecFile>Nerdbank.GitVersioning.nuspec</NuSpecFile>

    <NoPackageAnalysis>true</NoPackageAnalysis>

    <!-- Note that https://github.com/NuGet/Home/issues/4694 prevents this from actually working. -->
    <developmentDependency>true</developmentDependency>

    <!-- We're going to include it by virtue of sending the whole bin dir to the build folder. -->
    <IncludeBuildOutput>false</IncludeBuildOutput>
    <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <Target Name="SetNuSpecPropertiesFinal" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion;SetNuSpecProperties">
    <PropertyGroup>
      <LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\1.0.210\</LibGit2SharpNativeBinaries>
      <NuspecProperties>$(NuspecProperties);LicenseUrl=$(PackageLicenseUrl);Version=$(Version);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries)</NuspecProperties>
    </PropertyGroup>
  </Target>

  <Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
    <PropertyGroup>
      <BuildSubDir Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">MSBuildCore\</BuildSubDir>
      <BuildSubDir Condition=" '$(TargetFramework)' == 'net461' ">MSBuildFull\</BuildSubDir>
    </PropertyGroup>
    <Error Text="Unrecognized TargetFramework" Condition=" '$(BuildSubDir)' == '' " />
    <ItemGroup>
      <TfmSpecificPackageFile Include="
                        $(OutputPath)LibGit2Sharp.dll*;
                        $(OutputPath)MSBuildExtensionTask.dll;
                        $(OutputPath)Nerdbank.GitVersioning.*dll;
                        $(OutputPath)Newtonsoft.Json.dll;
                        $(OutputPath)Validation.dll;
               ">
        <PackagePath>build\$(BuildSubDir)</PackagePath>
      </TfmSpecificPackageFile>
      <!-- Package up the libgit2 native binaries -->
      <TfmSpecificPackageFile Include="@(None)" Condition=" '%(None.CopyToOutputDirectory)' == 'PreserveNewest' ">
        <PackagePath>build\$(BuildSubDir)%(None.Link)</PackagePath>
      </TfmSpecificPackageFile>
    </ItemGroup>
  </Target>

  <Target Name="ExpandForNpmPackage" DependsOnTargets="GenerateNuSpec" AfterTargets="GenerateNuSpec">
    <PropertyGroup>
      <NpmPackageLayoutDir>..\nerdbank-gitversioning.npm\out\nbgv.nuget\</NpmPackageLayoutDir>
    </PropertyGroup>
    <ItemGroup>
      <NpmPackageLayout Include="@(_PackageFiles)">
        <TargetPath Condition=" '%(_PackageFiles.PackagePath)' != '' ">$(NpmPackageLayoutDir)$([System.IO.Path]::GetDirectoryName('%(_PackageFiles.PackagePath)'))\%(FileName)%(Extension)</TargetPath>
        <TargetPath Condition=" '%(_PackageFiles.PackagePath)' == '' ">$(NpmPackageLayoutDir)%(FileName)%(Extension)</TargetPath>
      </NpmPackageLayout>
    </ItemGroup>
    <Copy SourceFiles="@(NpmPackageLayout)" DestinationFiles="@(NpmPackageLayout->'%(TargetPath)')" />
  </Target>
<commit_msg>Fix NPM package build<commit_after>﻿<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>

    <NuSpecFile>Nerdbank.GitVersioning.nuspec</NuSpecFile>

    <NoPackageAnalysis>true</NoPackageAnalysis>

    <!-- Note that https://github.com/NuGet/Home/issues/4694 prevents this from actually working. -->
    <developmentDependency>true</developmentDependency>

    <!-- We're going to include it by virtue of sending the whole bin dir to the build folder. -->
    <IncludeBuildOutput>false</IncludeBuildOutput>
    <TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <Target Name="SetNuSpecPropertiesFinal" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion;SetNuSpecProperties">
    <PropertyGroup>
      <LibGit2SharpNativeBinaries>$(NuGetPackageRoot)libgit2sharp.nativebinaries\1.0.217\</LibGit2SharpNativeBinaries>
      <NuspecProperties>$(NuspecProperties);LicenseUrl=$(PackageLicenseUrl);Version=$(Version);BaseOutputPath=$(OutputPath);LibGit2SharpNativeBinaries=$(LibGit2SharpNativeBinaries)</NuspecProperties>
    </PropertyGroup>
  </Target>

  <Target Name="PackBuildOutputs" DependsOnTargets="SatelliteDllsProjectOutputGroup;DebugSymbolsProjectOutputGroup">
    <PropertyGroup>
      <BuildSubDir Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">MSBuildCore\</BuildSubDir>
      <BuildSubDir Condition=" '$(TargetFramework)' == 'net461' ">MSBuildFull\</BuildSubDir>
    </PropertyGroup>
    <Error Text="Unrecognized TargetFramework" Condition=" '$(BuildSubDir)' == '' " />
    <ItemGroup>
      <TfmSpecificPackageFile Include="
                        $(OutputPath)LibGit2Sharp.dll*;
                        $(OutputPath)MSBuildExtensionTask.dll;
                        $(OutputPath)Nerdbank.GitVersioning.*dll;
                        $(OutputPath)Newtonsoft.Json.dll;
                        $(OutputPath)Validation.dll;
               ">
        <PackagePath>build\$(BuildSubDir)</PackagePath>
      </TfmSpecificPackageFile>
      <!-- Package up the libgit2 native binaries -->
      <TfmSpecificPackageFile Include="@(ContentWithTargetPath)" Condition=" '%(ContentWithTargetPath.CopyToOutputDirectory)' == 'PreserveNewest' ">
        <PackagePath>build\$(BuildSubDir)%(ContentWithTargetPath.TargetPath)</PackagePath>
      </TfmSpecificPackageFile>
    </ItemGroup>
  </Target>

  <Target Name="ExpandForNpmPackage" DependsOnTargets="GenerateNuSpec" AfterTargets="GenerateNuSpec">
    <PropertyGroup>
      <NpmPackageLayoutDir>..\nerdbank-gitversioning.npm\out\nbgv.nuget\</NpmPackageLayoutDir>
    </PropertyGroup>
    <ItemGroup>
      <NpmPackageLayout Include="@(_PackageFiles)">
        <TargetPath Condition=" '%(_PackageFiles.PackagePath)' != '' ">$(NpmPackageLayoutDir)$([System.IO.Path]::GetDirectoryName('%(_PackageFiles.PackagePath)'))\%(FileName)%(Extension)</TargetPath>
        <TargetPath Condition=" '%(_PackageFiles.PackagePath)' == '' ">$(NpmPackageLayoutDir)%(FileName)%(Extension)</TargetPath>
      </NpmPackageLayout>
    </ItemGroup>
    <Copy SourceFiles="@(NpmPackageLayout)" DestinationFiles="@(NpmPackageLayout->'%(TargetPath)')" />
  </Target>

{'fraction_non_alphanumeric': 0.13684367098021716, 'fraction_numerical': 0.007734642272794883, 'mean_word_length': 4.806563039723661, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 133, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '258934', 'n_tokens_mistral': 2077, 'n_tokens_neox': 1884, 'n_words': 233}