From 83ae67194846195f2228736cd871f7ebdb45836a Mon Sep 17 00:00:00 2001 From: Azareal Date: Wed, 6 Jun 2018 14:33:47 +1000 Subject: [PATCH] Added some missing commands from the scripts for Linux. Removed some unnecessary messages when cleaning up build artifacts. Added the binary as a build artifact to be cleaned up. git stash is now used for updates to better deal with changes to chmodded files. --- README.md | 8 +++++--- build-linux | 17 ++++++++++++++--- build-linux-nowebsockets | 17 ++++++++++++++--- dev-update-linux | 2 ++ dev-update.bat | 10 ++++++++++ run-linux | 17 ++++++++++++++--- run-linux-nowebsockets | 17 ++++++++++++++--- 7 files changed, 73 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 61ff3939..6f36b4a4 100644 --- a/README.md +++ b/README.md @@ -126,11 +126,13 @@ go get -u github.com/denisenkom/go-mssqldb go get -u github.com/fsnotify/fsnotify -rm template_*.go +rm -f template_*.go -rm gen_*.go +rm -f gen_*.go -rm tmpl_client/template_*.go +rm -f tmpl_client/template_*.go + +rm -f ./Gosora go generate diff --git a/build-linux b/build-linux index c0ccbb94..eea439ca 100644 --- a/build-linux +++ b/build-linux @@ -1,7 +1,18 @@ echo "Deleting artifacts from previous builds" -rm template_*.go -rm gen_*.go -rm tmpl_client/template_*.go +rm -f template_*.go +rm -f gen_*.go +rm -f tmpl_client/template_*.go +rm -f ./Gosora + +echo "Building the router generator" +go build ./router_gen +echo "Running the router generator" +router_gen.exe + +echo "Building the query generator" +go build ./query_gen +echo "Running the query generator" +query_gen.exe echo "Building Gosora" go generate diff --git a/build-linux-nowebsockets b/build-linux-nowebsockets index d18431df..534b871c 100644 --- a/build-linux-nowebsockets +++ b/build-linux-nowebsockets @@ -1,7 +1,18 @@ echo "Deleting artifacts from previous builds" -rm template_*.go -rm gen_*.go -rm tmpl_client/template_*.go +rm -f template_*.go +rm -f gen_*.go +rm -f tmpl_client/template_*.go +rm -f ./Gosora + +echo "Building the router generator" +go build ./router_gen +echo "Running the router generator" +router_gen.exe + +echo "Building the query generator" +go build ./query_gen +echo "Running the query generator" +query_gen.exe echo "Building Gosora" go generate diff --git a/dev-update-linux b/dev-update-linux index a2f3f5ed..d41a57f6 100644 --- a/dev-update-linux +++ b/dev-update-linux @@ -34,7 +34,9 @@ go get -u github.com/fsnotify/fsnotify echo "Updating Gosora" rm ./schema/lastSchema.json cp ./schema/schema.json ./schema/lastSchema.json +git stash git pull origin master +git stash apply echo "Patching Gosora" cd ./patcher diff --git a/dev-update.bat b/dev-update.bat index 12b3ad15..d0429d91 100644 --- a/dev-update.bat +++ b/dev-update.bat @@ -98,11 +98,21 @@ cd schema del /Q lastSchema.json copy schema.json lastSchema.json cd .. +git stash +if %errorlevel% neq 0 ( + pause + exit /b %errorlevel% +) git pull origin master if %errorlevel% neq 0 ( pause exit /b %errorlevel% ) +git stash apply +if %errorlevel% neq 0 ( + pause + exit /b %errorlevel% +) echo Patching Gosora go generate diff --git a/run-linux b/run-linux index f1c4beac..6ec8a699 100644 --- a/run-linux +++ b/run-linux @@ -1,11 +1,22 @@ echo "Deleting artifacts from previous builds" -rm template_*.go -rm gen_*.go -rm tmpl_client/template_*.go +rm -f template_*.go +rm -f gen_*.go +rm -f tmpl_client/template_*.go +rm -f ./Gosora echo "Generating the dynamic code" go generate +echo "Building the router generator" +go build ./router_gen +echo "Running the router generator" +router_gen.exe + +echo "Building the query generator" +go build ./query_gen +echo "Running the query generator" +query_gen.exe + echo "Building Gosora" go build -o Gosora diff --git a/run-linux-nowebsockets b/run-linux-nowebsockets index ce18d033..d741898e 100644 --- a/run-linux-nowebsockets +++ b/run-linux-nowebsockets @@ -1,11 +1,22 @@ echo "Deleting artifacts from previous builds" -rm template_*.go -rm gen_*.go -rm tmpl_client/template_*.go +rm -f template_*.go +rm -f gen_*.go +rm -f tmpl_client/template_*.go +rm -f ./Gosora echo "Generating the dynamic code" go generate +echo "Building the router generator" +go build ./router_gen +echo "Running the router generator" +router_gen.exe + +echo "Building the query generator" +go build ./query_gen +echo "Running the query generator" +query_gen.exe + echo "Building Gosora" go build -o Gosora -tags no_ws