<commit_before>@echo off
setlocal EnableDelayedExpansion

set __ProjectDir=%~dp0
set __DotNet=%__ProjectDir%\Tools\dotnetcli\dotnet.exe
set __MSBuild=%__ProjectDir%\Tools\MSBuild.dll
set __PortableBuildArgs=false

:Arg_Loop
if "%1" == "" goto ArgsDone

if /i "%1" == "-portable"             (set __PortableBuildArgs=true&shift&goto Arg_Loop)

:ArgsDone

:: Initialize the MSBuild Tools
call "%__ProjectDir%\init-tools.cmd"

:: Restore dependencies mainly to obtain runtime.json
pushd "%__ProjectDir%\deps"
"%__DotNet%" restore --configfile "%__ProjectDir%\..\NuGet.Config" --packages "%__ProjectDir%\packages"
popd

:: Clean up existing nupkgs
if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")

"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\tasks\core-setup.tasks.builds" /verbosity:minimal /flp:logfile=tools.log;v=diag
if not ERRORLEVEL 0 goto :Error

:: Package the assets using Tools
"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\packages.builds" /p:OSGroup=Windows_NT /verbosity:minimal /p:PortableBuild=%__PortableBuildArgs%

if not ERRORLEVEL 0 goto :Error
exit /b 0

:Error
echo An error occurred during packing.
exit /b 1
<commit_msg>Fix pack.cmd ERRORLEVEL early exits<commit_after>@echo off
setlocal EnableDelayedExpansion

set __ProjectDir=%~dp0
set __DotNet=%__ProjectDir%\Tools\dotnetcli\dotnet.exe
set __MSBuild=%__ProjectDir%\Tools\MSBuild.dll
set __PortableBuildArgs=false

:Arg_Loop
if "%1" == "" goto ArgsDone

if /i "%1" == "-portable"             (set __PortableBuildArgs=true&shift&goto Arg_Loop)

:ArgsDone

:: Initialize the MSBuild Tools
call "%__ProjectDir%\init-tools.cmd"
if NOT [!ERRORLEVEL!]==[0] goto :Error

:: Restore dependencies mainly to obtain runtime.json
pushd "%__ProjectDir%\deps"
"%__DotNet%" restore --configfile "%__ProjectDir%\..\NuGet.Config" --packages "%__ProjectDir%\packages"
if NOT [!ERRORLEVEL!]==[0] goto :Error
popd

:: Clean up existing nupkgs
if exist "%__ProjectDir%\bin" (rmdir /s /q "%__ProjectDir%\bin")

"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\tasks\core-setup.tasks.builds" /verbosity:minimal /flp:logfile=tools.log;v=diag
if NOT [!ERRORLEVEL!]==[0] goto :Error

:: Package the assets using Tools
"%__DotNet%" "%__MSBuild%" "%__ProjectDir%\packages.builds" /p:OSGroup=Windows_NT /verbosity:minimal /p:PortableBuild=%__PortableBuildArgs%
if NOT [!ERRORLEVEL!]==[0] goto :Error

exit /b 0

:Error
echo An error occurred during packing.
exit /b 1

{'fraction_non_alphanumeric': 0.1435070306038048, 'fraction_numerical': 0.006617038875103391, 'mean_word_length': 5.756983240223463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '597327', 'n_tokens_mistral': 865, 'n_tokens_neox': 823, 'n_words': 208}