41 lines
651 B
Batchfile
41 lines
651 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
echo ==============================
|
|
echo Building Go binaries...
|
|
echo ==============================
|
|
|
|
set APP_NAME=dbPrompt
|
|
|
|
REM Create output folder
|
|
if not exist dist mkdir dist
|
|
|
|
REM Windows build
|
|
echo Building Windows...
|
|
set GOOS=windows
|
|
set GOARCH=amd64
|
|
go build -o dist\%APP_NAME%-windows-amd64.exe
|
|
|
|
if errorlevel 1 goto error
|
|
|
|
REM Linux build
|
|
echo Building Linux...
|
|
set GOOS=linux
|
|
set GOARCH=amd64
|
|
go build -o dist\%APP_NAME%-linux-amd64
|
|
|
|
if errorlevel 1 goto error
|
|
|
|
echo ==============================
|
|
echo Build completed successfully!
|
|
echo Output in dist\
|
|
goto end
|
|
|
|
:error
|
|
echo.
|
|
echo BUILD FAILED!
|
|
exit /b 1
|
|
|
|
:end
|
|
endlocal
|