fix(ci): 修复版本检测为空时未回退到根目录版本的问题
Some checks failed
CI / build (20.15.1) (push) Failing after 24m4s

当检测到版本为空时,回退到根目录的package.json中获取版本号
This commit is contained in:
shanshanzhong 2025-12-07 06:18:56 -08:00
parent 42cf06c373
commit 2e4540095b

View File

@ -310,6 +310,10 @@ jobs:
VERSION=$(jq -r .version package.json)
echo "使用根目录版本: $VERSION"
fi
if [ "$VERSION" = "null" ] || [ -z "$VERSION" ] || [ "$VERSION" = "undefined" ]; then
echo "检测到版本为空,回退到根目录版本"
VERSION=$(jq -r .version package.json)
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: 根据分支动态设置API地址