Initial updates server repository commit.

Reinitialize repository history and exclude generated OTA artifact outputs.

Made-with: Cursor
This commit is contained in:
2026-03-09 21:33:34 +08:00
commit a0ef7f430d
14 changed files with 1466 additions and 0 deletions

19
build-docker-tar.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
TAG=${1:-$(date +%Y%m%d-%H%M%S)}
IMAGE="carrot-bbs-updates-server:${TAG}"
TAR_NAME="carrot-bbs-updates-server-${TAG}.tar"
echo "[1/3] 构建 Linux 二进制..."
go build -o server ./cmd/server
echo "[2/3] 构建 Docker 镜像: ${IMAGE}"
docker build -t "${IMAGE}" .
echo "[3/3] 导出镜像 tar: ${TAR_NAME}"
docker save -o "${TAR_NAME}" "${IMAGE}"
echo "完成:"
echo " 镜像: ${IMAGE}"
echo " 归档: $(pwd)/${TAR_NAME}"