🚚 (split): 从 moon-source 拆出独立仓库,更新只管本插件
书源插件自成仓库、独立发版;update.lua 改为只检查并更新本插件(仓库 GarfieldMoon/moonsource-jjwxc), 打包、测试脚本与发布流程改为单插件,跨书源的测试按插件拆开。公共文件见 moonsource-template。 Co-authored-by: Copilot <[email protected]>
This commit is contained in:
1 parent
3305bfb291
commit
75da39c177
8 files changed
+996
-110
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# 离线单元测试:借用月读仓库的测试运行器与桩,把本仓库的插件目录和 tests/ 加进 LUA_PATH。
|
||||
# 用法:MOON_DIR=/path/to/moon tools/run-tests.sh [spec 文件…]
|
||||
set -euo pipefail
|
||||
here="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
: "${MOON_DIR:?请把 MOON_DIR 设为月读仓库路径}"
|
||||
paths="$here/tests/?.lua;$here/tests/?/init.lua"
|
||||
for plugin in "$here"/moonsource-*.koplugin; do
|
||||
paths="$paths;$plugin/?.lua"
|
||||
done
|
||||
export LUA_PATH="$paths;;"
|
||||
if [ "$#" -eq 0 ]; then
|
||||
set -- $(find "$here/tests" -name '*_spec.lua' | sort)
|
||||
fi
|
||||
cd "$MOON_DIR"
|
||||
exec luajit tests/run.lua "$@"
|
||||
Reference in new issue
Block a user