From b45b11bcbaa3e55dc962e0f34b5e42fb2cb15c6b Mon Sep 17 00:00:00 2001 From: Home Date: Mon, 30 Mar 2026 04:20:48 +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.ios | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile.ios b/Jenkinsfile.ios index c7239879..94b80809 100644 --- a/Jenkinsfile.ios +++ b/Jenkinsfile.ios @@ -40,7 +40,7 @@ pipeline { stage('清理旧构建') { steps { sh "rm -rf dist/" // 清理 UniApp 打包生成的 dist 目录 - sh "rm -rf ${env.ARCHIVE_PATH}" // 清理 上次的归档文件 + sh "rm -rf ${env.ARCHIVE_PATH}" // 清理 上次的构建文件 } } // stage('安装依赖') { @@ -163,22 +163,13 @@ pipeline { } stage('导出IPA安装包') { steps { - script { - // 导出 IPA 命令(自动从归档文件生成) - def exportCommand = [ - "xcodebuild -exportArchive", - "-archivePath ${ARCHIVE_PATH}", - "-exportPath ${APP_DIR}/build", - "-exportOptionsPlist ${EXPORT_OPTIONS_PLIST}", - "-allowProvisioningUpdates" - ].join(' ') - - echo "开始导出IPA:${exportCommand}" - sh(exportCommand) - - // 查看生成的文件 - sh "ls -la ${APP_DIR}/build/" - } + sh ''' + xcodebuild -exportArchive \\ + -archivePath ${ARCHIVE_PATH} \\ + -exportPath ${APP_DIR}/build \\ + -exportOptionsPlist ${EXPORT_OPTIONS_PLIST} \\ + -allowProvisioningUpdates + ''' } } }