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"
|
2018-06-24 13:49:29 +00:00
|
|
|
cd tmpl_client
|
|
|
|
del "template_*.go"
|
|
|
|
cd ..
|
2018-06-06 06:13:55 +00:00
|
|
|
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%
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Building the router generator
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" ./router_gen
|
2017-05-11 13:04:43 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
echo Running the router generator
|
|
|
|
router_gen.exe
|
2018-03-21 05:56:33 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-05-11 13:04:43 +00:00
|
|
|
|
2017-06-05 11:57:27 +00:00
|
|
|
echo Building the query generator
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" "./cmd/query_gen"
|
2017-06-05 11:57:27 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
echo Running the query generator
|
|
|
|
query_gen.exe
|
2018-03-21 05:56:33 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-06-05 11:57:27 +00:00
|
|
|
|
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
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" -o gosora.exe -tags no_ws
|
2017-05-11 13:04:43 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2018-03-21 05:56:33 +00:00
|
|
|
echo Building the templates
|
|
|
|
gosora.exe -build-templates
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2018-03-31 05:25:27 +00:00
|
|
|
echo Building the executable... again
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" -o gosora.exe -tags no_ws
|
2018-03-31 05:25:27 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2017-05-11 13:04:43 +00:00
|
|
|
echo Running Gosora
|
|
|
|
gosora.exe
|
|
|
|
pause
|