#!/usr/bin/env bash # publish 全链路冒烟:临时库+本地bare远程(不碰真实仓库) cd "C:/Users/20175/.zcode/mcp-servers/wedo-repo/mcp" || exit 1 export PROTO_REPO="D:/haolou/hanglung/ams/docs/_init_test" export WEDO_HUB_URL="" OUT="D:/haolou/hanglung/ams/docs/_smoke" git init --bare "$OUT/bare.git" -b main 2>/dev/null git -C "$PROTO_REPO" remote add origin "file:///D:/haolou/hanglung/ams/docs/_smoke/bare.git" 2>/dev/null git -C "$PROTO_REPO" config user.name lio; git -C "$PROTO_REPO" config user.email lio@wxapp.info printf '# 测试页\n' > "$PROTO_REPO/工作台/测试页.html" { echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"1"}}}' echo '{"jsonrpc":"2.0","method":"notifications/initialized"}' echo '{"jsonrpc":"2.0","id":9,"method":"tools/call","params":{"name":"proto_publish","arguments":{"files":["工作台/测试页.html"],"message":"测试页冒烟"}}}' echo '{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"proto_sync","arguments":{"pull":false}}}' sleep 4 } | timeout 40 node index.js 2>/dev/null > "$OUT/pub.jsonl" python - </dev/null || echo "(空)"