Files
gemini-banlancer/build.bat
2025-11-20 12:12:26 +08:00

41 lines
1.1 KiB
Batchfile

@echo off
setlocal
:: =========================================
:: build.bat - Automated Build Script (ASCII-Safe Windows Version)
:: =========================================
:: Step 1: Announce that the build process has started.
echo.
echo [AIR] ^> Build process initiated...
pushd "%~dp0"
:: Step 2: [CORE] Compile the latest stylesheet using Tailwind CSS.
echo [AIR] ^> Compiling Tailwind CSS...
tailwindcss -i ./web/static/css/input.css -o ./web/static/css/output.css --minify
:: Step 3: Check if Tailwind compilation was successful.
if %errorlevel% neq 0 (
echo [AIR] ^> !!! Tailwind CSS compilation FAILED. Halting build.
popd
exit /b 1
)
:: Step 4: After CSS is confirmed to be up-to-date, build the Go application.
echo [AIR] ^> Building Go application (main.exe)...
go build -o ./tmp/main.exe ./cmd/server
:: Step 5: Check if Go compilation was successful.
if %errorlevel% neq 0 (
echo [AIR] ^> !!! Go application build FAILED.
exit /b %errorlevel%
)
:: Step 6: Report that all tasks have been completed successfully.
echo [AIR] ^> Build finished successfully.
popd
echo.
endlocal