From 3fd8facbdbe580ef31eb20a44e6d82048704aa21 Mon Sep 17 00:00:00 2001 From: smail Date: Thu, 17 Sep 2026 18:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E8=A1=8C=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E5=B7=A5=E5=85=B7=E9=93=BE=E7=89=88=E6=9C=AC=E6=9D=A5?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- test/frontend/output-paths.test.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b6d2439..76e1036 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SMAIL_VERSION ?= $(shell git describe --tags --always --dirty) GIT_HASH ?= $(shell git show -s --format=%H) BUILD_TIME ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ) -GO_VERSION ?= $(shell go version) +GO_VERSION ?= $(shell cd backend && go version) BUILD_LDFLAGS = -s -w -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.Version=$(SMAIL_VERSION)' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.GitHash=$(GIT_HASH)' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.BuildTime=$(BUILD_TIME)' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.GoVersion=$(GO_VERSION)' .PHONY: build clean clean_codex_test_artifacts build_fe build_server wechat_push spam_block telegram_push plugin package test test_mysql test_postgres diff --git a/test/frontend/output-paths.test.mjs b/test/frontend/output-paths.test.mjs index 4772d89..89c09b5 100644 --- a/test/frontend/output-paths.test.mjs +++ b/test/frontend/output-paths.test.mjs @@ -11,6 +11,7 @@ const read = relative => readFile(path.join(root, relative), 'utf8') test('跨平台构建输出不得越过项目 out 目录', async () => { const content = await read('Makefile') + assert.match(content, /GO_VERSION \?= \$\(shell cd backend && go version\)/) const commands = [...content.matchAll(/cd ([^\s]+) && [^\n]*go build [^\n]* -o ([^\s]+) /g)] assert.equal(commands.length, 12) for (const [, directory, output] of commands) {