Merge remote-tracking branch 'origin/main'

This commit is contained in:
summer 2025-10-16 17:55:30 +08:00
commit c8ebd6e7de

View File

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