Skip to content

Commit

Permalink
fix(CI): 修复依赖下载异常,PNPM版本约束统一
Browse files Browse the repository at this point in the history
  • Loading branch information
142vip.cn committed Oct 31, 2023
1 parent 56cb1de commit af06e39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package.json
@@ -1,20 +1,20 @@
{
"name": "408CSFamily",
"description": "专业代号408,计算机基础知识点合集",
"description": "研究生考试408考点、工作面试计算机基础知识合集",
"version": "0.0.1-alpha.8",
"packageManager": "pnpm@8.9.2",
"engines": {
"node": "^18.x",
"pnpm": ">=7.2.1"
},
"author": {
"name": "Chu Fan",
"email": "fairy_408@2925.com",
"url": "https://github.com/142vip"
},
"packageManager": "pnpm@8.9.2",
"engines": {
"node": "^18.x",
"pnpm": "8"
},
"scripts": {
"preinstall": "chmod +x ./scripts/*",
"postinstall": "npm run build:mark-map",
"postinstall": "pnpm build:mark-map",
"prepare": "rm -f .husky/pre-commit && husky install && npx husky add .husky/pre-commit \"./scripts/lint\" && chmod +x .husky/pre-commit",
"dev": "vuepress dev docs",
"build": "./scripts/bundle build",
Expand Down
6 changes: 5 additions & 1 deletion scripts/ci
Expand Up @@ -6,7 +6,8 @@
##

# 期望的 pnpm 大版本号
majorVersionRequired="8"
majorVersionRequired=$(grep -o '"pnpm": *"[^"]*"' package.json | awk -F'"' '{print $4}')
echo "期望的 pnpm 大版本号:$majorVersionRequired"

# 检测 pnpm 是否已安装并且大版本号符合要求
checkPNPMVersion() {
Expand Down Expand Up @@ -37,3 +38,6 @@ fi

# 安装项目依赖
pnpm i --frozen-lockfile --registry https://registry.npmmirror.com



0 comments on commit af06e39

Please sign in to comment.