支持钉版本:install.sh --ref / POJIA_REF,install.ps1 -Ref;package.json 指向 tag v1.1.71

This commit is contained in:
tiancaixiexiong1997
2026-11-13 02:23:20 +08:00
parent fcee6fdc8f
commit fe6e68b6d2
5 changed files with 46 additions and 6 deletions
+6 -3
View File
@@ -24,9 +24,12 @@ node -v
# 2. 定位 DSH_HOME(按顺序取第一个含 profiles/<profile>/package.json 的)
# $DSH_HOME → ~/.dsh → $APPDATA/DeepSeek Harness/dsh-home → $LOCALAPPDATA/DeepSeek Harness/dsh-home
# 3. 安装(二选一)
bash install.sh --profile desktop # macOS / Linux
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Profile desktop # Windows
# 3. 安装(二选一;批量部署建议钉 tag,当前 v1.1.71)
bash install.sh --profile desktop --ref v1.1.71 # macOS / Linux(钉 tag,可复现)
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Profile desktop -Ref v1.1.71 # Windows
# 本地没有仓库(无 git 的机器):直接拉 tag 版脚本
curl -fsSL https://raw.githubusercontent.com/tiancaixiexiong1997/deepseek-pojia/v1.1.71/install.sh | POJIA_REF=v1.1.71 bash
# 4. 打印状态,原样贴给用户
node "$DSH_HOME/plugins/dsh-purge/bin/dsh-purge.js" --status
+20
View File
@@ -37,6 +37,26 @@ Windows 一条命令(自带 `curl.exe` / PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/heads/main.zip -OutFile $env:TEMP\pojia.zip; Expand-Archive $env:TEMP\pojia.zip $env:TEMP\pojia -Force; & \"$env:TEMP\pojia\deepseek-pojia-main\install.ps1\""
```
### 钉版本安装(推荐给智能体 / 批量部署)
`main` 会跟着提交变;要可复现就钉 tag。当前版本 **v1.1.71**:
```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/tiancaixiexiong1997/deepseek-pojia/v1.1.71/install.sh | POJIA_REF=v1.1.71 bash
# 或者直接下 release 附件再跑
curl -fsSL -o pojia.tar.gz https://github.com/tiancaixiexiong1997/deepseek-pojia/releases/download/v1.1.71/deepseek-pojia-1.1.71.tar.gz
tar xzf pojia.tar.gz && cd deepseek-pojia-1.1.71 && bash install.sh
```
```powershell
# Windows:tag 版 zip
powershell -NoProfile -ExecutionPolicy Bypass -Command "iwr https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/tags/v1.1.71.zip -OutFile $env:TEMP\pojia.zip; Expand-Archive $env:TEMP\pojia.zip $env:TEMP\pojia -Force; & \"$env:TEMP\pojia\deepseek-pojia-1.1.71\install.ps1\" -Ref v1.1.71"
```
版本清单见 [Releases](https://github.com/tiancaixiexiong1997/deepseek-pojia/releases)。
装完**还要应用一次补丁**(这是宿主的设计,任何安装器都替代不了):
1. 完全退出宿主(桌面端托盘右键 → 退出;`dsh web` 用 Ctrl-C 停)
+9
View File
@@ -13,6 +13,7 @@
param(
[ValidateSet('desktop', 'web')][string]$Profile = 'desktop',
[string]$DshHome = '',
[string]$Ref = 'main',
[switch]$Apply
)
@@ -21,6 +22,7 @@ $ProgressPreference = 'SilentlyContinue'
function Say([string]$m) { Write-Host (" " + $m) }
function Bad([string]$m) { Write-Host (" X " + $m) -ForegroundColor Red }
function Warn([string]$m) { Write-Host (" ! " + $m) -ForegroundColor Yellow }
$Here = $PSScriptRoot
@@ -34,7 +36,14 @@ $ver = (& $node.Source -v) 2>$null
if ($ver -match '^v(\d+)') { $major = [int]$Matches[1] }
if ($major -lt 18) { Bad ("Node 版本太低(" + $ver + "),需要 >= 18"); exit 1 }
$localVer = ''
try { $localVer = (Get-Content (Join-Path $Here 'package.json') -Raw | ConvertFrom-Json).version } catch { }
Write-Host '== dsh-purge 一键安装'
Say ("插件版本:" + $localVer + " (-Ref " + $Ref + ")")
if ($Ref -ne 'main' -and $Ref -ne ('v' + $localVer)) {
Warn ("你手上的这份是 " + $localVer + ",-Ref 要的是 " + $Ref + ";要钉版本请下 tag 版 zip")
}
Say ("插件:" + $Here)
Say ("profile:" + $Profile)
Say ("Node:" + $ver)
+9 -1
View File
@@ -20,12 +20,14 @@ fi
PROFILE="desktop"
HOME_DIR=""
APPLY=0
POJIA_REF="${POJIA_REF:-main}"
while [ $# -gt 0 ]; do
case "$1" in
--profile) PROFILE="${2:-desktop}"; shift 2 ;;
--home) HOME_DIR="${2:-}"; shift 2 ;;
--apply) APPLY=1; shift ;;
--ref) POJIA_REF="${2:-main}"; shift 2 ;;
-h|--help)
cat <<'USAGE'
用法:bash install.sh [选项]
@@ -33,6 +35,7 @@ while [ $# -gt 0 ]; do
--profile <desktop|web> 装进哪个 profile(默认 desktop)
--home <DSH_HOME> 手动指定 .dsh 目录
--apply 装完直接应用补丁(等价于点「应用」)
--ref <main|v1.1.71> 装哪个版本(默认 main;钉版本用 tag)
-h, --help 这段帮助
USAGE
exit 0 ;;
@@ -42,7 +45,12 @@ done
say() { printf ' %s\n' "$*"; }
TARBALL="https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/heads/main.tar.gz"
# 装哪个版本:默认 main(跟最新提交);POJIA_REF=v1.1.71 则钉到 tag
if [ "$POJIA_REF" = "main" ]; then
TARBALL="https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/heads/main.tar.gz"
else
TARBALL="https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/tags/${POJIA_REF}.tar.gz"
fi
# curl | bash 时本地没有仓库文件:先落一份 tarball 到临时目录再继续
if [ ! -f "$HERE/scripts/link-profile.mjs" ]; then
+2 -2
View File
@@ -86,8 +86,8 @@
},
"install": {
"preferred": "tarball",
"tarball": "https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/heads/main.tar.gz",
"zip": "https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/heads/main.zip",
"tarball": "https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/tags/v1.1.71.tar.gz",
"zip": "https://github.com/tiancaixiexiong1997/deepseek-pojia/archive/refs/tags/v1.1.71.zip",
"git": "https://github.com/tiancaixiexiong1997/deepseek-pojia.git"
}
},