File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed
Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # #
3+ # # 依赖安装脚本
4+ # # 使用:
5+ # # ./scripts/ci
6+ # #
27
3- #
4- # 依赖安装脚本
5- # 使用:
6- # ./scripts/ci
7- #
8-
9- NPM_REGISTRY=" https://mirrors.tencent.com/npm/"
8+ # NPM_REGISTRY="https://mirrors.tencent.com/npm/"
9+ NPM_REGISTRY=" https://registry.npmmirror.com"
1010
1111# # 获取所有参数
1212echo " 运行命令: export COREPACK_NPM_REGISTRY=$NPM_REGISTRY && corepack enable pnpm && pnpm i --registry $NPM_REGISTRY --frozen-lockfile $* "
1313
14+
15+ # 检查是否已安装 corepack,如果没有则安装
16+ if ! command -v corepack & > /dev/null; then
17+ echo " 未检测到 corepack,正在安装..."
18+ npm i corepack@latest -g
19+ else
20+ echo " corepack 已安装,版本: $( corepack --version) "
21+ fi
22+
1423# 导出corepack环境变量,安装pnpm版本
15- export COREPACK_NPM_REGISTRY=$NPM_REGISTRY COREPACK_INTEGRITY_KEYS=0 && corepack enable pnpm
24+ export COREPACK_NPM_REGISTRY=$NPM_REGISTRY && corepack enable pnpm
1625
17- # 安装项目依赖
26+ # 安装项目依赖 -w -F @142vip/fairy-cli
1827pnpm i --registry $NPM_REGISTRY --frozen-lockfile " $@ "
You can’t perform that action at this time.
0 commit comments