<commit_before>@echo off
REM This is really hacky. We should look into using psake...
if not exist "NodaTime Release.snk" (
    echo Cannot build NuGet package without NodaTime Release.snk
    goto :end
)

REM Make sure we can build all the variants
msbuild "src\NodaTime-Tools.sln" /property:Configuration=Release
src\NodaTime.Tools.ProjectBuilder\bin\Release\NodaTime.Tools.ProjectBuilder src
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-pcl.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-net4.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

REM This will also build the unsigned release build. A bit wasteful,
REM but that's okay...
call buildapidocs.bat
IF ERRORLEVEL 1 EXIT /B 1

copy /y docs\PublicApi\NodaTime.xml src\NodaTime\bin\Release
copy /y docs\PublicApi\NodaTime.Testing.xml src\NodaTime.Testing\bin\Release
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml src\NodaTime.Testing\bin\Release

rmdir /s /q nuget
mkdir nuget
pushd nuget
nuget pack ..\src\NodaTime\NodaTime.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Testing\NodaTime.Testing.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Serialization.JsonNet\NodaTime.Serialization.JsonNet.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

popd
<commit_msg>Use the trimmed XML when building Nuget packages.<commit_after>@echo off
REM This is really hacky. We should look into using psake...
if not exist "NodaTime Release.snk" (
    echo Cannot build NuGet package without NodaTime Release.snk
    goto :end
)

REM Make sure we can build all the variants
msbuild "src\NodaTime-Tools.sln" /property:Configuration=Release
src\NodaTime.Tools.ProjectBuilder\bin\Release\NodaTime.Tools.ProjectBuilder src
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-pcl.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-net4.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

REM This will also build the unsigned release build. A bit wasteful,
REM but that's okay...
call buildapidocs.bat
IF ERRORLEVEL 1 EXIT /B 1

copy /y docs\PublicApi\NodaTime.xml "src\NodaTime\bin\Signed Release"
copy /y docs\PublicApi\NodaTime.Testing.xml "src\NodaTime.Testing\bin\Signed Release"
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml "src\NodaTime.Testing\bin\Signed Release"

copy /y docs\PublicApi\NodaTime.xml "src\NodaTime\bin\Signed Release Net4"
copy /y docs\PublicApi\NodaTime.Testing.xml "src\NodaTime.Testing\bin\Signed Release Net4"
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml "src\NodaTime.Testing\bin\Signed Release Net4"

rmdir /s /q nuget
mkdir nuget
pushd nuget
nuget pack ..\src\NodaTime\NodaTime.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Testing\NodaTime.Testing.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Serialization.JsonNet\NodaTime.Serialization.JsonNet.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

popd

{'fraction_non_alphanumeric': 0.09231244211176289, 'fraction_numerical': 0.011423278789749922, 'mean_word_length': 4.373134328358209, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 9}, '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': '5849905', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1120, 'n_words': 330}