@@ -120,11 +120,11 @@ trigger_jenkins() {
# 触发构建并获取队列位置
QUEUE_URL=$(curl -s -X POST "$JENKINS_URL/build" \
--user "$USERNAME:$JENKINS_TOKEN" \
- -H "Jenkins-Crumb: $(curl -s "$JENKINS_URL/crumbIssuer/api/xml" --user "$USERNAME:$JENKINS_TOKEN" | grep -oP '<crumb>\K[^<]+')" \
+ -H "Jenkins-Crumb: $(curl -s "$JENKINS_URL/crumbIssuer/api/xml" --user "$USERNAME:$JENKINS_TOKEN" | sed -n 's/.*<crumb>\(.*\)<\/crumb>.*/\1/p')" \
-I | grep -i "Location:" | awk '{print $2}' | tr -d '\r')
if [ -z "$QUEUE_URL" ]; then
- echo -e "\033[31mJenkins 任务触发失败\033[0m"
+ echo -e "\033[ tay31mJenkins 任务触发失败\033[0m"
exit 1
fi
@@ -22,7 +22,8 @@
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
"lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",
"lint:style": "stylelint --fix \"./src/**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
- "lint:lint-staged": "lint-staged -c "
+ "lint:lint-staged": "lint-staged -c ",
+ "deploy": "./bash/run.sh"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
@@ -146,4 +147,4 @@
"node": ">= 16.0.0",
"pnpm": ">=8.6.0"
}
-}
+}