@echo off
setlocal

:: Install necessary build tools if they are missing
echo --- Checking build tools... ---
pip install --upgrade build twine

:: Run python script to build and upload
python scripts/publish.py %*

if %ERRORLEVEL% NEQ 0 (
    echo [ERROR] An error occurred during publishing.
    exit /b %ERRORLEVEL%
)

endlocal
