Skip to content

Commit c743674

Browse files
committed
fix(build): 默认构建先嵌入前端
调整构建顺序并让 backend Makefile 强制使用 embed 标签,防止手工构建生成无前端二进制。
1 parent 059c65b commit c743674

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ FRONTEND_CRITICAL_VITEST := \
1111
src/components/account/__tests__/EditAccountModal.spec.ts
1212

1313
# 一键编译前后端
14-
build: build-backend build-frontend
14+
build: build-frontend build-backend
1515

1616
# 编译后端(复用 backend/Makefile)
1717
build-backend:

backend/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ VERSION ?= $(shell tr -d '\r\n' < ./cmd/server/VERSION)
44
LDFLAGS ?= -s -w -X main.Version=$(VERSION)
55

66
build:
7-
CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -trimpath -o bin/server ./cmd/server
7+
CGO_ENABLED=0 go build -tags=embed -ldflags="$(LDFLAGS)" -trimpath -o bin/server ./cmd/server
88

99
generate:
1010
go generate ./ent

0 commit comments

Comments
 (0)