From 29d5d82fa5238e37d3ed1743b3c906cef17932a8 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:26:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20xpack=20Makefile?= =?UTF-8?q?=20(#4204)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 441f164d8..973814af6 100644 --- a/Makefile +++ b/Makefile @@ -32,3 +32,16 @@ build_backend_on_darwin: build_all: build_frontend build_backend_on_linux build_on_local: clean_assets build_frontend build_backend_on_darwin upx_bin + + +build_backend_on_linux_xpack: + cd $(SERVER_PATH) \ + && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + +build_backend_on_darwin_xpack: + cd $(SERVER_PATH) \ + && GOOS=linux GOARCH=amd64 $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(APP_NAME) $(MAIN) + +build_all_xpack: build_frontend build_backend_on_linux_xpack + +build_on_local_xpack: clean_assets build_frontend build_backend_on_darwin_xpack upx_bin