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"
|
2018-06-24 13:49:29 +00:00
|
|
|
cd tmpl_client
|
2020-03-22 23:14:08 +00:00
|
|
|
del "template_*"
|
|
|
|
del "tmpl_*"
|
2018-06-24 13:49:29 +00:00
|
|
|
cd ..
|
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%
|
|
|
|
)
|
|
|
|
|
2019-02-10 05:52:26 +00:00
|
|
|
echo Generating the JSON handlers
|
|
|
|
easyjson -pkg common
|
|
|
|
|
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
|
|
|
|
|
|
|
echo Building the installer
|
2019-07-10 15:33:07 +00:00
|
|
|
go build -ldflags="-s -w" "./cmd/install"
|
2017-01-12 02:55:08 +00:00
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
pause
|
|
|
|
exit /b %errorlevel%
|
|
|
|
)
|
2017-04-13 09:26:40 +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 09:26:40 +00:00
|
|
|
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%
|
|
|
|
)
|
2017-01-12 02:55:08 +00:00
|
|
|
echo Gosora was successfully built
|
2016-12-06 10:26:48 +00:00
|
|
|
pause
|