feat: 增加 xpack Makefile (#4204)

This commit is contained in:
ssongliu 2024-03-15 17:26:08 +08:00 committed by GitHub
parent 46f01032b8
commit 29d5d82fa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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