From e1a3ec1f1dc016cf9c64085755d748c81308c325 Mon Sep 17 00:00:00 2001 From: a Date: Mon, 21 Feb 2022 03:42:55 +0000 Subject: [PATCH] some changes --- Makefile | 18 +++++++++++++++++- build-linux | 16 +--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 840edb9a..bc8a8f3d 100644 --- a/Makefile +++ b/Makefile @@ -2,4 +2,20 @@ tidy: - go mod tidy \ No newline at end of file + go mod tidy + +build: + mkdir -p bin + go build -ldflags="-s -w" -o ./bin/gosora.exe . + + + +clean: + echo "Deleting artifacts from previous builds" + rm -f template_*.go + rm -f tmpl_*.go + rm -f gen_*.go + rm -f tmpl_client/template_* + rm -f tmpl_client/tmpl_* + rm -f ./bin/* + rm -f ./common/gen_extend.go diff --git a/build-linux b/build-linux index 8ae81a62..f672af1a 100644 --- a/build-linux +++ b/build-linux @@ -1,11 +1,3 @@ -echo "Deleting artifacts from previous builds" -rm -f template_*.go -rm -f tmpl_*.go -rm -f gen_*.go -rm -f tmpl_client/template_* -rm -f tmpl_client/tmpl_* -rm -f ./Gosora -rm -f ./common/gen_extend.go echo "Building the router generator" go build -ldflags="-s -w" -o RouterGen "./router_gen" @@ -22,9 +14,6 @@ go build -tags hookgen -ldflags="-s -w" -o HookGen "./cmd/hook_gen" echo "Running the hook generator" ./HookGen -echo "Generating the JSON handlers" -easyjson -pkg common - echo "Building the query generator" go build -ldflags="-s -w" -o QueryGen "./cmd/query_gen" echo "Running the query generator" @@ -32,7 +21,4 @@ echo "Running the query generator" echo "Building Gosora" go generate -go build -ldflags="-s -w" -o Gosora - -echo "Building the installer" -go build -ldflags="-s -w" -o Installer "./install" +go build -ldflags="-s -w" -o ./bin/gosora.exe