From 0bbdb6482ef8b23704512c87641baf32f41843ed Mon Sep 17 00:00:00 2001 From: Azareal Date: Sun, 31 Mar 2019 10:39:54 +1000 Subject: [PATCH] Fixed the installer. --- docs/installation.md | 4 ++++ install-linux | 2 ++ install.bat | 12 ++++++++++++ pre-run-linux | 6 +++--- update-deps-linux | 4 ++-- update-deps.bat | 8 ++++++-- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 3f0ba7eb..3fffe217 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -116,6 +116,10 @@ You also need to substitute the `gosora.exe` bits for `./Gosora` on Linux. For m ```bash git clone https://github.com/Azareal/Gosora +go get -u github.com/mailru/easyjson/... + +easyjson -pkg common + go get rm -f template_*.go diff --git a/install-linux b/install-linux index de3e6b6a..ecf503e3 100644 --- a/install-linux +++ b/install-linux @@ -1,4 +1,6 @@ echo "Installing the dependencies" +go get -u github.com/mailru/easyjson/... +easyjson -pkg common go get echo "Building the installer" diff --git a/install.bat b/install.bat index b9da8abd..26064daf 100644 --- a/install.bat +++ b/install.bat @@ -1,6 +1,18 @@ @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 diff --git a/pre-run-linux b/pre-run-linux index 450c5916..2c8de7f7 100644 --- a/pre-run-linux +++ b/pre-run-linux @@ -7,6 +7,9 @@ rm -f ./Gosora echo "Generating the dynamic code" go generate +echo "Generating the JSON handlers" +easyjson -pkg common + echo "Building the router generator" go build -o RouterGen "./router_gen" echo "Running the router generator" @@ -17,9 +20,6 @@ go build -o QueryGen "./cmd/query_gen" echo "Running the query generator" ./QueryGen -echo "Generating the JSON handlers" -easyjson -pkg common - echo "Building Gosora" go build -o Gosora diff --git a/update-deps-linux b/update-deps-linux index 7c0b65bf..6d1b7668 100644 --- a/update-deps-linux +++ b/update-deps-linux @@ -1,4 +1,4 @@ echo "Updating the dependencies" -go get +go get -u github.com/mailru/easyjson/... -go get -u github.com/mailru/easyjson/... \ No newline at end of file +go get \ No newline at end of file diff --git a/update-deps.bat b/update-deps.bat index 84b31ccc..570ab408 100644 --- a/update-deps.bat +++ b/update-deps.bat @@ -1,13 +1,17 @@ @echo off echo Updating the dependencies +go get -u github.com/mailru/easyjson/... +if %errorlevel% neq 0 ( + pause + exit /b %errorlevel% +) + go get if %errorlevel% neq 0 ( pause exit /b %errorlevel% ) -go get -u github.com/mailru/easyjson/... - echo The dependencies were successfully updated pause