remove more useless files
This commit is contained in:
parent
553e66b590
commit
89265ee383
|
@ -1,4 +1,4 @@
|
|||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"editor.insertSpaces": false
|
||||
"editor.insertSpaces": true
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
# Contributing
|
||||
|
||||
First and foremost, if you want to add a contribution, you'll have to open a pull request and to sign the CLA (contributor level agreement).
|
||||
|
||||
It's mainly there to deal with any legal issues which may come our way and to switch licenses without having to track down every contributor who has ever contributed.
|
||||
|
||||
Some things we could do is commercial licensing for companies which are not authorised to use open source licenses or moving to a more permissive license, although I'm not too experianced in these matters, if anyone has any ideas, then feel free to put them forward.
|
||||
|
||||
Try to prefix commits which introduce a lot of bugs or otherwise has a large impact on the usability of Gosora with UNSTABLE.
|
||||
|
||||
If something seems to be strange, then feel free to bring up an alternative for it, although I'd rather not get hung up on the little details, if it's something which is purely a matter of opinion.
|
||||
|
||||
# Coding Standards
|
||||
|
||||
All code must be unit tested where ever possible with the exception of JavaScript which is untestable with our current technologies, tread with caution there.
|
||||
|
||||
Use tabs not spaces for indentation.
|
||||
|
||||
# Golang
|
||||
|
||||
Use the standard linter and listen to what it tells you to do.
|
||||
|
||||
The route assignments in main.go are *legacy code*, add new routes to `router_gen/routes.go` instead.
|
||||
|
||||
Try to use the single responsibility principle where ever possible, with the exception for if doing so will cause a large performance drop. In other words, don't give your interfaces / structs too many responsibilities, keep them simple.
|
||||
|
||||
Avoid hand-rolling queries. Use the builders, a ready built statement or a datastore structure instead. Preferably a datastore.
|
||||
|
||||
Commits which require the patcher / update script to be run should be prefixed with "Database Changes: "
|
||||
|
||||
More coming up.
|
||||
|
||||
# JavaScript
|
||||
|
||||
Use semicolons at the end of statements. If you don't, you might wind up breaking a minifier or two.
|
||||
|
||||
Always use strict mode.
|
||||
|
||||
Don't worry about ES5, we're targetting modern browsers. If we decide to backport code to older browsers, then we'll transpile the files.
|
||||
|
||||
Please don't use await. It incurs too much of a cognitive overhead as to where and when you can use it. We can't use it everywhere quite yet, which means that we really should be using it nowhere.
|
||||
|
||||
Please don't abuse `const` just to shave off a few nanoseconds. Even in the Go server where I care about performance the most, I don't use const everywhere, only in about five spots in thirty thousand lines and I don't use it for performance at all there.
|
||||
|
||||
To keep consistency with Go code, variables must be camelCase.
|
||||
|
||||
# JSON
|
||||
|
||||
To keep consistency with Go code, map keys must be camelCase.
|
||||
|
||||
# Phrases
|
||||
|
||||
Try to keep the name of the phrase close to the actual phrase in english to make it easier for localisers to reason about which phrase is which.
|
|
@ -1,63 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
echo Building the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe -tags no_ws
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the installer
|
||||
go build -ldflags="-s -w" "./cmd/install"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the hook stub generator
|
||||
go build -ldflags="-s -w" "./cmd/hook_stub_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the hook generator
|
||||
go build -tags hookgen -ldflags="-s -w" "./cmd/hook_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Gosora was successfully built
|
||||
pause
|
63
build.bat
63
build.bat
|
@ -1,63 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
echo Building the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the installer
|
||||
go build -ldflags="-s -w" "./cmd/install"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the hook stub generator
|
||||
go build -ldflags="-s -w" "./cmd/hook_stub_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the hook generator
|
||||
go build -tags hookgen -ldflags="-s -w" "./cmd/hook_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Gosora was successfully built
|
||||
pause
|
|
@ -1,11 +0,0 @@
|
|||
echo Building the templates
|
||||
gosora.exe -build-templates
|
||||
|
||||
echo Rebuilding the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
pause
|
|
@ -1,21 +0,0 @@
|
|||
# An example systemd service file
|
||||
[Unit]
|
||||
Description=Gosora
|
||||
|
||||
[Service]
|
||||
User=gosora
|
||||
Group=www-data
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
# Set these to the location of Gosora
|
||||
WorkingDirectory=/home/gosora/src
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
# Make sure you manually run pre-run-linux before you start the service
|
||||
ExecStart=/home/gosora/src/Gosora
|
||||
|
||||
ProtectSystem=full
|
||||
PrivateDevices=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,7 +0,0 @@
|
|||
go get -u github.com/mailru/easyjson/...
|
||||
easyjson -pkg common
|
||||
go get
|
||||
|
||||
go build -ldflags="-s -w" -o Installer "./cmd/install"
|
||||
|
||||
./Installer --dbType=mysql --dbHost=localhost --dbUser=$MYSQL_USER --dbPassword=$MYSQL_PASSWORD --dbName=$MYSQL_DATABASE --shortSiteName=$SITE_SHORT_NAME --siteName=$SITE_NAME --siteURL=$SITE_URL --serverPort=$SERVER_PORT--secureServerPort=$SECURE_SERVER_PORT
|
|
@ -1,8 +0,0 @@
|
|||
echo "Installing the dependencies"
|
||||
./update-deps-linux
|
||||
|
||||
echo "Building the installer"
|
||||
go build -ldflags="-s -w" -o Installer "./cmd/install"
|
||||
|
||||
echo "Running the installer"
|
||||
./Installer
|
29
install.bat
29
install.bat
|
@ -1,29 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo Installing the dependencies
|
||||
go get -u github.com/mailru/easyjson/...
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
easyjson -pkg common
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
go get
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the installer
|
||||
go generate
|
||||
go build -ldflags="-s -w" "./cmd/install"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
install.exe
|
|
@ -1 +0,0 @@
|
|||
0.1.0-dev
|
|
@ -1,8 +0,0 @@
|
|||
echo "Updating Gosora"
|
||||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
|
||||
echo "Patching Gosora"
|
||||
go build -ldflags="-s -w" -o Patcher "./patcher"
|
||||
./Patcher
|
|
@ -1,96 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the router generator
|
||||
router_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the query generator
|
||||
query_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe -tags no_ws
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the templates
|
||||
gosora.exe -build-templates
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable... again
|
||||
go build -ldflags="-s -w" -o gosora.exe -tags no_ws
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Running Gosora
|
||||
gosora.exe
|
||||
pause
|
98
run.bat
98
run.bat
|
@ -1,98 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the router generator
|
||||
router_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the query generator
|
||||
query_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the templates
|
||||
gosora.exe -build-templates
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable... again
|
||||
go build -ldflags="-s -w" -gcflags="-d=ssa/check_bce/debug=1" -o gosora.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Running Gosora
|
||||
gosora.exe
|
||||
rem Or you could redirect the output to a file
|
||||
rem gosora.exe > ./logs/ops.log 2>&1
|
||||
pause
|
|
@ -1,96 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the router generator
|
||||
router_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the query generator
|
||||
query_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable
|
||||
go build -ldflags="-s -w" -o gosora.exe -tags mssql
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the templates
|
||||
gosora.exe -build-templates
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable... again
|
||||
go build -ldflags="-s -w" -o gosora.exe -tags mssql
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Running Gosora
|
||||
gosora.exe
|
||||
pause
|
|
@ -1,79 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the router generator
|
||||
router_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the query generator
|
||||
query_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable
|
||||
go test
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
pause
|
|
@ -1,79 +0,0 @@
|
|||
@echo off
|
||||
rem TODO: Make these deletes a little less noisy
|
||||
del "template_*.go"
|
||||
del "tmpl_*.go"
|
||||
del "gen_*.go"
|
||||
del ".\tmpl_client\template_*"
|
||||
del ".\tmpl_client\tmpl_*"
|
||||
del ".\common\gen_extend.go"
|
||||
del "gosora.exe"
|
||||
|
||||
echo Generating the dynamic code
|
||||
go generate
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the router generator
|
||||
go build -ldflags="-s -w" ./router_gen
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the router generator
|
||||
router_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Generating the JSON handlers
|
||||
easyjson -pkg common
|
||||
|
||||
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%
|
||||
)
|
||||
|
||||
echo Building the query generator
|
||||
go build -ldflags="-s -w" "./cmd/query_gen"
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
echo Running the query generator
|
||||
query_gen.exe
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo Building the executable
|
||||
go test -tags mssql
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
pause
|
|
@ -1,23 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo Updating the dependencies
|
||||
go get -u github.com/mailru/easyjson/...
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
easyjson -pkg common
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
go get
|
||||
if %errorlevel% neq 0 (
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo The dependencies were successfully updated
|
||||
pause
|
Loading…
Reference in New Issue