This commit is contained in:
huangjin
2026-06-29 17:34:59 +08:00
commit fe3ad20fe2
271 changed files with 51767 additions and 0 deletions

28
sc-lktx-backend/build.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
# 编译 Go 后端到 Linux amd64
# 使用方式:./build.sh
set -e
cd "$(dirname "$0")"
OUTPUT="server"
BIN_DIR="bin"
echo "=== 编译 Go 后端Linux amd64==="
# 设置交叉编译环境
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
go build -ldflags="-s -w" -o "${BIN_DIR}/${OUTPUT}" ./cmd/server/
echo "=== 编译完成 ==="
echo "输出文件:${BIN_DIR}/${OUTPUT}"
file "${BIN_DIR}/${OUTPUT}"
# 复制配置文件
cp config/config-prod.yaml "${BIN_DIR}/" 2>/dev/null || echo "注意config-prod.yaml 不存在"
echo "=== 部署文件 ==="
ls -lh "${BIN_DIR}/"