2017-01-12 02:55:08 +00:00
|
|
|
@echo off
|
2018-06-06 06:13:55 +00:00
|
|
|
rem TODO: Make these deletes a little less noisy
|
|
|
|
del "template_*.go"
|
2020-03-22 23:14:08 +00:00
|
|
|
del "tmpl_*.go"
|
2018-06-06 06:13:55 +00:00
|
|
|
del "gen_*.go"
|
2020-05-24 08:06:24 +00:00
|
|
|
del ".\tmpl_client\template_*"
|
|
|
|
del ".\tmpl_client\tmpl_*"
|
|
|
|
del ".\common\gen_extend.go"
|
2018-06-06 06:13:55 +00:00
|
|
|
del "gosora.exe"
|
|
|
|
|
2017-01-17 07:55:46 +00:00
|
|
|
echo Generating the dynamic code
|
|
|
|
go generate
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2017-04-13 10:55:51 +00:00
|
|
|
echo Building the router generator
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" ./router_gen
|
2017-04-13 10:55:51 +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-04-13 10:55:51 +00:00
|
|
|
|
2020-05-24 08:06:24 +00:00
|
|
|
echo Building the hook stub generator
|
|
|
|
go build -ldflags="-s -w" "./cmd/hook_stub_gen"
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
echo Running the hook stub generator
|
|
|
|
hook_stub_gen.exe
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2020-07-19 01:06:09 +00:00
|
|
|
echo Generating the JSON handlers
|
|
|
|
easyjson -pkg common
|
|
|
|
|
2020-05-24 08:06:24 +00:00
|
|
|
echo Building the hook generator
|
|
|
|
go build -tags hookgen -ldflags="-s -w" "./cmd/hook_gen"
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
echo Running the hook generator
|
|
|
|
hook_gen.exe
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
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
|
|
|
|
2017-01-17 07:55:46 +00:00
|
|
|
echo Building the executable
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" -o gosora.exe
|
2017-01-12 02:55:08 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-01-17 07:55:46 +00:00
|
|
|
|
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
|
2020-03-22 23:14:08 +00:00
|
|
|
go build -ldflags="-s -w" -gcflags="-d=ssa/check_bce/debug=1" -o gosora.exe
|
2018-03-31 05:25:27 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
|
|
|
|
2017-01-17 07:55:46 +00:00
|
|
|
echo Running Gosora
|
2016-12-11 16:06:17 +00:00
|
|
|
gosora.exe
|
2017-08-13 11:22:34 +00:00
|
|
|
rem Or you could redirect the output to a file
|
2018-04-03 04:34:07 +00:00
|
|
|
rem gosora.exe > ./logs/ops.log 2>&1
|
2016-12-05 07:21:17 +00:00
|
|
|
pause
|