<commit_before>@ECHO off

IF NOT "x%1" == "x" GOTO :%1

GOTO :build

:large
ECHO "Building large"
cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild
GOTO :end

:large64
ECHO "Building large64"
cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild  -G"Visual Studio 12 2013 Win64"
GOTO :end

:tiny
ECHO "Building tiny"
cmake -H. -Bbuild
GOTO :end

:tiny64
ECHO "Building tiny64"
cmake -H. -Bbuild -G"Visual Studio 12 2013 Win64"
GOTO :end

:build
IF NOT EXIST build CALL Make.bat large
cmake --build build --config Release -- /maxcpucount
COPY build\Release\luvi.exe .
GOTO :end

:test
IF NOT EXIST luvi.exe CALL Make.bat
SET LUVI_APP=samples\test.app
luvi.exe
SET LUVI_TARGET=test.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
test.exe
DEL /Q test.exe
GOTO :end

:winsvc
IF NOT EXIST luvi.exe CALL Make.bat
DEL /Q winsvc.exe
SET LUVI_APP=samples\winsvc.app
SET LUVI_TARGET=winsvc.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end

:repl
IF NOT EXIST luvi.exe CALL Make.bat
DEL /Q repl.exe
SET LUVI_APP=samples\repl.app
SET LUVI_TARGET=repl.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end


:clean
IF EXIST build RMDIR /S /Q build
IF EXIST luvi.exe DEL /F /Q luvi.exe
GOTO :end

:publish
ECHO "Building all versions"
git submodule update --init --recursive
CALL make.bat clean
CALL make.bat tiny64
CALL make.bat test
COPY build\Release\luvi.exe luvi-binaries\Windows\luvi-tiny.exe
CALL make.bat clean
CALL make.bat large64
CALL make.bat test
COPY build\Release\luvi.exe luvi-binaries\Windows\luvi.exe
CD luvi-binaries
git pull
git add Windows
git commit
git push
CD ..

:end<commit_msg>Fix makefile for windows to use github-release<commit_after>@ECHO off

for /f %%i in ('git describe') do set LUVI_TAG=%%i
IF NOT "x%1" == "x" GOTO :%1

GOTO :build

:static
ECHO "Building static"
cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild
GOTO :end

:static64
ECHO "Building static64"
cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild  -G"Visual Studio 12 2013 Win64"
GOTO :end

:tiny
ECHO "Building tiny"
cmake -H. -Bbuild
GOTO :end

:tiny64
ECHO "Building tiny64"
cmake -H. -Bbuild -G"Visual Studio 12 2013 Win64"
GOTO :end

:build
IF NOT EXIST build CALL Make.bat large
cmake --build build --config Release -- /maxcpucount
COPY build\Release\luvi.exe .
GOTO :end

:test
IF NOT EXIST luvi.exe CALL Make.bat
SET LUVI_APP=samples\test.app
luvi.exe
SET LUVI_TARGET=test.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
test.exe
DEL /Q test.exe
GOTO :end

:winsvc
IF NOT EXIST luvi.exe CALL Make.bat
DEL /Q winsvc.exe
SET LUVI_APP=samples\winsvc.app
SET LUVI_TARGET=winsvc.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end

:repl
IF NOT EXIST luvi.exe CALL Make.bat
DEL /Q repl.exe
SET LUVI_APP=samples\repl.app
SET LUVI_TARGET=repl.exe
luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end


:clean
IF EXIST build RMDIR /S /Q build
IF EXIST luvi.exe DEL /F /Q luvi.exe
GOTO :end

:publish
ECHO "Building all versions"
git submodule update --init --recursive
CALL make.bat clean
CALL make.bat tiny64
CALL make.bat test
GOTO :end

:reset
git submodule update --init --recursive
git clean -f -d
git checkout .
GOTO :end

:publish-tiny
CALL make.bat reset
CALL make.bat tiny64
CALL make.bat test
github-release upload --user luvit --repo luvi --tag %LUVI_TAG% --file luvi.exe --name luvi-tiny-Windows-amd64.exe
GOTO :end

:publish-static
CALL make.bat reset
CALL make.bat static64
CALL make.bat test
github-release upload --user luvit --repo luvi --tag %LUVI_TAG% --file luvi.exe --name luvi-static-Windows-amd64.exe
GOTO :end

:end
{'fraction_non_alphanumeric': 0.10653753026634383, 'fraction_numerical': 0.01775625504439064, 'mean_word_length': 4.093150684931507, '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': '6969089', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1493, 'n_words': 473}