- Go 项目骨架 (zhiyid daemon, port 7821) - Rust 项目骨架 (zhiyi-consolidate sidecar) - 完整设计文档 v3.8 (DESIGN.md) - 实施计划 8 个里程碑 (IMPLEMENTATION.md) - systemd 部署文件 - Makefile 构建系统
39 lines
804 B
Makefile
39 lines
804 B
Makefile
.PHONY: build clean install test
|
|
|
|
# Go 构建
|
|
build-go:
|
|
cd go && go build -o zhiyid ./cmd/zhiyid/
|
|
|
|
# Rust 构建
|
|
build-rust:
|
|
cd rust && cargo build --release
|
|
|
|
# 全部构建
|
|
build: build-go build-rust
|
|
|
|
# 清理
|
|
clean:
|
|
cd go && go clean
|
|
cd rust && cargo clean
|
|
|
|
# 安装 systemd 服务
|
|
install:
|
|
sudo cp deploy/zhiyid.service /etc/systemd/system/
|
|
sudo cp deploy/zhiyi-consolidate.service /etc/systemd/system/
|
|
sudo cp deploy/zhiyi-consolidate.timer /etc/systemd/system/
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl enable --now zhiyid
|
|
sudo systemctl enable --now zhiyi-consolidate.timer
|
|
|
|
# API 测试
|
|
test-api:
|
|
curl -s http://localhost:7821/health | jq .
|
|
|
|
# FAISS → LanceDB 迁移
|
|
migrate:
|
|
python3 scripts/migrate.py
|
|
|
|
# git 标签
|
|
tag:
|
|
git tag -a v$$(cat VERSION) -m "Release v$$(cat VERSION)"
|