2017-05-11 13:04:43 +00:00
|
|
|
@echo off
|
2018-06-06 06:13:55 +00:00
|
|
|
rem TODO: Make these deletes a little less noisy
|
|
|
|
del "template_*.go"
|
|
|
|
del "gen_*.go"
|
|
|
|
del "tmpl_client/template_*.go"
|
|
|
|
del "gosora.exe"
|
|
|
|
|
2017-05-11 13:04:43 +00:00
|
|
|
echo Generating the dynamic code
|
|
|
|
go generate
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2019-02-10 05:52:26 +00:00
|
|
|
echo Generating the JSON handlers
|
|
|
|
easyjson -pkg common
|
|
|
|
|
2017-05-11 13:04:43 +00:00
|
|
|
echo Building the executable
|
|
|
|
go build -o gosora.exe -tags no_ws
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Building the installer
|
2018-10-27 03:21:02 +00:00
|
|
|
go build "./cmd/install"
|
2017-05-11 13:04:43 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Building the router generator
|
|
|
|
go build ./router_gen
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-06-05 11:57:27 +00:00
|
|
|
|
|
|
|
echo Building the query generator
|
2018-10-27 03:21:02 +00:00
|
|
|
go build "./cmd/query_gen"
|
2017-06-05 11:57:27 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-05-11 13:04:43 +00:00
|
|
|
echo Gosora was successfully built
|
|
|
|
pause
|