From 227821809072fe1dc90fbed6a590b260934359f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=96=B9=E6=88=90?= Date: Thu, 16 Oct 2025 17:42:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=BB=9F=E4=B8=80=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=90=8D=E7=A7=B0=E6=A0=BC=E5=BC=8F=E5=B9=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=9E=84=E5=BB=BA=E7=9B=AE=E6=A0=87=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将项目名称从"mini-chat"统一改为"minichat"格式 更新构建命令中的目标文件从$(SERVICE_STYLE).go改为main.go --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 50691e7..f09e1b0 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ # Custom configuration | 独立配置 # Service name | 项目名称 -SERVICE=mini-chat +SERVICE=minichat # Service name in specific style | 项目经过style格式化的名称 -SERVICE_STYLE=mini-chat +SERVICE_STYLE=minichat # Service name in lowercase | 项目名称全小写格式 -SERVICE_LOWER=mini-chat +SERVICE_LOWER=minichat # Service name in snake format | 项目名称下划线格式 -SERVICE_SNAKE=mini_chat +SERVICE_SNAKE=minichat # Service name in snake format | 项目名称短杠格式 -SERVICE_DASH=mini-chat +SERVICE_DASH=minichat # The project version, if you don't use git, you should set it manually | 项目版本,如果不使用git请手动设置 VERSION=$(shell git describe --tags --always) @@ -93,17 +93,17 @@ gen-api: # Generate API files | 生成 API 的代码 .PHONY: build-win build-win: # Build project for Windows | 构建Windows下的可执行文件 - env CGO_ENABLED=0 GOOS=windows go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX).exe $(SERVICE_STYLE).go + env CGO_ENABLED=0 GOOS=windows go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX).exe main.go @echo "Build project for Windows successfully" .PHONY: build-mac build-mac: # Build project for MacOS | 构建MacOS下的可执行文件 - env CGO_ENABLED=0 GOOS=darwin go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX) $(SERVICE_STYLE).go + env CGO_ENABLED=0 GOOS=darwin go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX) main.go @echo "Build project for MacOS successfully" .PHONY: build-linux build-linux: # Build project for Linux | 构建Linux下的可执行文件 - env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX) $(SERVICE_STYLE).go + env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(SERVICE_STYLE)_$(PROJECT_BUILD_SUFFIX) main.go @echo "Build project for Linux successfully" .PHONY: proto2api