refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名) - 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块) - docreader proto 描述符采用等长替换,保持序列化字节布局有效 - Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像 - 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -1,4 +1,4 @@
|
||||
class WeknoraLite < Formula
|
||||
class AcademyLite < Formula
|
||||
desc "Knowledge base management system — single-binary Lite edition"
|
||||
homepage "https://github.com/Tencent/WeKnora"
|
||||
version "0.3.6-test"
|
||||
@@ -6,38 +6,38 @@ class WeknoraLite < Formula
|
||||
|
||||
on_macos do
|
||||
on_arm do
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/WeKnora-lite_v#{version}_darwin_arm64.tar.gz"
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/Academy-lite_v#{version}_darwin_arm64.tar.gz"
|
||||
sha256 "1da2d4eef99e5cf8aa7a58501baa059e9e20482e1bd65a36a82321a89926c104"
|
||||
end
|
||||
on_intel do
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/WeKnora-lite_v#{version}_darwin_amd64.tar.gz"
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/Academy-lite_v#{version}_darwin_amd64.tar.gz"
|
||||
sha256 "c187e16ac7671a615f012c82ebd89786e11fcf67cccc773eff175e4bdf7c9c06"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_arm do
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/WeKnora-lite_v#{version}_linux_arm64.tar.gz"
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/Academy-lite_v#{version}_linux_arm64.tar.gz"
|
||||
sha256 "bc4e184da005b60d1e8c037a61c58e643ebdc9bf14470fae6cd6227f52f02f1c"
|
||||
end
|
||||
on_intel do
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/WeKnora-lite_v#{version}_linux_amd64.tar.gz"
|
||||
url "https://github.com/Tencent/WeKnora/releases/download/v#{version}/Academy-lite_v#{version}_linux_amd64.tar.gz"
|
||||
sha256 "cb34c50fb5b05555fca16084ffc7710524ff78badb3b1b82474eb89d21545d6e"
|
||||
end
|
||||
end
|
||||
|
||||
def install
|
||||
libexec.install "WeKnora-lite"
|
||||
libexec.install "Academy-lite"
|
||||
pkgshare.install "web" if File.directory?("web")
|
||||
pkgshare.install "config" if File.directory?("config")
|
||||
pkgshare.install ".env.lite.example"
|
||||
doc.install "README.md"
|
||||
pkgshare.install "migrations" if File.directory?("migrations")
|
||||
|
||||
(bin/"weknora-lite").write <<~SH
|
||||
(bin/"academy-lite").write <<~SH
|
||||
#!/bin/bash
|
||||
CONFIG_DIR="${WEKNORA_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/weknora}"
|
||||
DATA_DIR="${WEKNORA_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/weknora}"
|
||||
CONFIG_DIR="${ACADEMY_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/academy}"
|
||||
DATA_DIR="${ACADEMY_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/academy}"
|
||||
|
||||
mkdir -p "$DATA_DIR/files" "$CONFIG_DIR/config" 2>/dev/null
|
||||
|
||||
@@ -51,7 +51,7 @@ class WeknoraLite < Formula
|
||||
|
||||
if [ ! -f "$CONFIG_DIR/.env.lite" ]; then
|
||||
cp "#{pkgshare}/.env.lite.example" "$CONFIG_DIR/.env.lite"
|
||||
sed -i '' "s|DB_PATH=.*|DB_PATH=$DATA_DIR/weknora.db|" "$CONFIG_DIR/.env.lite"
|
||||
sed -i '' "s|DB_PATH=.*|DB_PATH=$DATA_DIR/academy.db|" "$CONFIG_DIR/.env.lite"
|
||||
sed -i '' "s|LOCAL_STORAGE_BASE_DIR=.*|LOCAL_STORAGE_BASE_DIR=$DATA_DIR/files|" "$CONFIG_DIR/.env.lite"
|
||||
rm -f "$CONFIG_DIR/.env.lite-e"
|
||||
echo ""
|
||||
@@ -64,55 +64,55 @@ class WeknoraLite < Formula
|
||||
source "$CONFIG_DIR/.env.lite"
|
||||
set +a
|
||||
|
||||
export DB_PATH="${DB_PATH:-$DATA_DIR/weknora.db}"
|
||||
export DB_PATH="${DB_PATH:-$DATA_DIR/academy.db}"
|
||||
export LOCAL_STORAGE_BASE_DIR="${LOCAL_STORAGE_BASE_DIR:-$DATA_DIR/files}"
|
||||
export WEKNORA_WEB_DIR="${WEKNORA_WEB_DIR:-#{pkgshare}/web}"
|
||||
export ACADEMY_WEB_DIR="${ACADEMY_WEB_DIR:-#{pkgshare}/web}"
|
||||
|
||||
cd "$CONFIG_DIR"
|
||||
exec "#{libexec}/WeKnora-lite" "$@"
|
||||
exec "#{libexec}/Academy-lite" "$@"
|
||||
SH
|
||||
end
|
||||
|
||||
def post_install
|
||||
(var/"weknora").mkpath
|
||||
(var/"academy").mkpath
|
||||
(var/"log").mkpath
|
||||
end
|
||||
|
||||
service do
|
||||
run [bin/"weknora-lite"]
|
||||
run [bin/"academy-lite"]
|
||||
keep_alive true
|
||||
working_dir var/"weknora"
|
||||
log_path var/"log/weknora-lite.log"
|
||||
error_log_path var/"log/weknora-lite.log"
|
||||
working_dir var/"academy"
|
||||
log_path var/"log/academy-lite.log"
|
||||
error_log_path var/"log/academy-lite.log"
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
前台运行:
|
||||
weknora-lite
|
||||
academy-lite
|
||||
|
||||
后台服务(推荐):
|
||||
brew services start weknora-lite # 启动并开机自启
|
||||
brew services stop weknora-lite # 停止
|
||||
brew services restart weknora-lite # 重启
|
||||
brew services info weknora-lite # 查看状态
|
||||
brew services start academy-lite # 启动并开机自启
|
||||
brew services stop academy-lite # 停止
|
||||
brew services restart academy-lite # 重启
|
||||
brew services info academy-lite # 查看状态
|
||||
|
||||
日志:
|
||||
#{var}/log/weknora-lite.log
|
||||
#{var}/log/academy-lite.log
|
||||
|
||||
首次运行会自动创建配置文件:
|
||||
~/.config/weknora/.env.lite
|
||||
~/.config/academy/.env.lite
|
||||
|
||||
数据存储在:
|
||||
~/.local/share/weknora/
|
||||
~/.local/share/academy/
|
||||
|
||||
如需修改配置(LLM 服务地址、安全密钥等):
|
||||
$EDITOR ~/.config/weknora/.env.lite
|
||||
brew services restart weknora-lite
|
||||
$EDITOR ~/.config/academy/.env.lite
|
||||
brew services restart academy-lite
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
assert_predicate bin/"weknora-lite", :executable?
|
||||
assert_predicate bin/"academy-lite", :executable?
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user