Skip to content

Commit f140217

Browse files
committed
chore(ci): zashboard 改用 dist-no-fonts 包,解压目录识别通用化
- resources.json:assetPattern 改为 dist-no-fonts.zip,使用上游不内置字体的精简包(体积更小,缺失字体回退系统字体) - update-resources.yml:zashboard 解压后由「仅识别 dist/」改为自动进入单个顶层目录(兼容 dist/、dist-no-fonts/ 等任意包裹名),避免硬编码拷错路径
1 parent 386239d commit f140217

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.github/resources.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
{
3838
"path": "src/module/bin/zashboard",
3939
"repo": "Zephyruso/zashboard",
40-
"assetPattern": "dist.zip",
41-
"currentVersion": "v3.8.0"
40+
"assetPattern": "dist-no-fonts.zip",
41+
"currentVersion": ""
4242
}
4343
]
4444
}

.github/workflows/update-resources.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ jobs:
7878
rm -rf tmp-zashboard && mkdir -p tmp-zashboard
7979
if gh release download "$latest" --repo "$repo" --pattern "$pattern" --dir tmp-zashboard; then
8080
unzip -q tmp-zashboard/*.zip -d tmp-zashboard/extract
81-
# 兼容压缩包顶层可能为 dist/ 的情况
81+
# 若解压出单个顶层目录(dist/ 或 dist-no-fonts/ 等),进入它;否则用解压根
8282
srcdir="tmp-zashboard/extract"
83-
[ -d "$srcdir/dist" ] && srcdir="$srcdir/dist"
83+
inner="$(find "$srcdir" -mindepth 1 -maxdepth 1)"
84+
if [ "$(printf '%s\n' "$inner" | grep -c .)" = "1" ] && [ -d "$inner" ]; then
85+
srcdir="$inner"
86+
fi
8487
rm -rf "$dest"
8588
mkdir -p "$dest"
8689
cp -r "$srcdir"/. "$dest"/

0 commit comments

Comments
 (0)