github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/build.bat (about) 1 @echo off 2 rem TODO: Make these deletes a little less noisy 3 del "template_*.go" 4 del "tmpl_*.go" 5 del "gen_*.go" 6 del ".\tmpl_client\template_*" 7 del ".\tmpl_client\tmpl_*" 8 del ".\common\gen_extend.go" 9 del "gosora.exe" 10 11 echo Generating the dynamic code 12 go generate 13 if %errorlevel% neq 0 ( 14 pause 15 exit /b %errorlevel% 16 ) 17 18 echo Generating the JSON handlers 19 easyjson -pkg common 20 21 echo Building the executable 22 go build -ldflags="-s -w" -o gosora.exe 23 if %errorlevel% neq 0 ( 24 pause 25 exit /b %errorlevel% 26 ) 27 28 echo Building the installer 29 go build -ldflags="-s -w" "./cmd/install" 30 if %errorlevel% neq 0 ( 31 pause 32 exit /b %errorlevel% 33 ) 34 35 echo Building the router generator 36 go build -ldflags="-s -w" ./router_gen 37 if %errorlevel% neq 0 ( 38 pause 39 exit /b %errorlevel% 40 ) 41 42 echo Building the hook stub generator 43 go build -ldflags="-s -w" "./cmd/hook_stub_gen" 44 if %errorlevel% neq 0 ( 45 pause 46 exit /b %errorlevel% 47 ) 48 49 echo Building the hook generator 50 go build -tags hookgen -ldflags="-s -w" "./cmd/hook_gen" 51 if %errorlevel% neq 0 ( 52 pause 53 exit /b %errorlevel% 54 ) 55 56 echo Building the query generator 57 go build -ldflags="-s -w" "./cmd/query_gen" 58 if %errorlevel% neq 0 ( 59 pause 60 exit /b %errorlevel% 61 ) 62 echo Gosora was successfully built 63 pause