From a23e6a9525f4e898ebf54fc30c9d80285faf519d Mon Sep 17 00:00:00 2001 From: Home Date: Sun, 29 Mar 2026 16:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4jenkins=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 3 --- Jenkinsfile.ios | 15 +++++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ce77ec40..2d3f07d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,9 +40,6 @@ pipeline { stage('读取 manifest 版本号 → 写入环境变量') { steps { script { - // 1. 安装 json5(支持注释JSON) - sh 'npm install json5 --registry=https://registry.npmmirror.com' - // 2. 读取并设置为 环境变量(全局可用) env.versionName = sh( script: ''' diff --git a/Jenkinsfile.ios b/Jenkinsfile.ios index ef298a36..2d8ed1c2 100644 --- a/Jenkinsfile.ios +++ b/Jenkinsfile.ios @@ -7,6 +7,9 @@ pipeline { UNIAPP_APP_ID = '__UNI__EDE0E52' APP_DIR = "Ios/HBuilder-Hello/HBuilder-Hello" ASSETS_DIR = "${APP_DIR}/Pandora/apps/${UNIAPP_APP_ID}/www" + PROJECT_NAME = 'HBuilder-Hello' + SCHEME_NAME = 'HBuilder' + CONFIGURATION = 'Release' } stages { stage('打印环境变量') { @@ -35,9 +38,6 @@ pipeline { stage('读取 manifest 版本号 → 写入环境变量') { steps { script { - // 1. 安装 json5(支持注释JSON) - sh 'npm install json5 --registry=https://registry.npmmirror.com' - // 2. 读取并设置为 环境变量(全局可用) env.versionName = sh( script: ''' @@ -77,7 +77,14 @@ pipeline { // ====================== 构建 IPA ====================== stage('配置SDK & 赋予权限 & 编译IOS') { steps { - echo "✅ 配置SDK & 赋予权限 & 编译IOS" + echo "========== 🗑️清理旧构建内容 ==========" + sh """ + xcodebuild clean -workspace ${PROJECT_NAME}.xcworkspace \\ + -scheme ${SCHEME_NAME} \\ + -configuration ${configuration} \\ + clean + """ + } } }