From c4a23f6f3f50cbbcde000741ed25b70e2ce9a0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=8E=A0=E4=BA=BA?= Date: Wed, 10 Jul 2024 10:28:41 +0800 Subject: [PATCH] feat: add Makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 林玠人 --- Makefile | 17 +++++++++++++++++ scripts/build.sh | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..5ce4c7e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +APP_VERSION = v2.1.1 + +GOARCH=amd64 + +# Build pilotgo-front binary +pilotgo-front: ; $(info $(M)...Begin to build pilotgo-front binary.) @ ## Build pilotgo-front. + scripts/build.sh front; +# Build pilotgo-server binary +pilotgo-server: ; $(info $(M)...Begin to build pilotgo-server binary.) @ ## Build pilotgo-server. + scripts/build.sh backend ${GOARCH}; +container: ;$(info $(M)...Begin to build the docker image.) @ ## Build the docker image. + DOCKER_BUILDKIT=0 docker build --target pilotgo-server -t pilotgo_server:latest . --no-cache +clean: ; $(info $(M)...Begin to clean out dir.) @ ## clean out dir. + scripts/build.sh clean; +all: clean pilotgo-front pilotgo-server +pack: ; $(info $(M)...Begin to pack tar package dir.) @ ## pack tar package . + scripts/build.sh pack ${GOARCH} diff --git a/scripts/build.sh b/scripts/build.sh index e4b60c24..d32f4c38 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -105,6 +105,9 @@ function build_docker_image() { function clean() { rm -rf ./out + rm -rf ./src/app/server/resource/assets + rm -rf ./src/app/server/resource/index.html + rm -rf ./src/app/server/resource/pilotgo.ico } case $1 in -- Gitee