From 378b53fb111fc27d44fe073067ca46d8292738aa Mon Sep 17 00:00:00 2001 From: Home Date: Sun, 29 Mar 2026 23:43:29 +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 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile.ios b/Jenkinsfile.ios index 05c27160..2d152894 100644 --- a/Jenkinsfile.ios +++ b/Jenkinsfile.ios @@ -11,6 +11,7 @@ pipeline { SCHEME_NAME = 'HBuilder' CONFIGURATION = 'Release' + ARCHIVE_PATH = "${APP_DIR}//build/HBuilder.xcarchive" //归档文件输出路径 } stages { stage('打印环境变量') { @@ -73,14 +74,30 @@ pipeline { // } // } // ====================== 构建 IPA ====================== - stage('配置SDK & 赋予权限 & 编译IOS') { + stage('========== 🗑️清理旧构建内容 ==========') { steps { - echo "========== 🗑️清理旧构建内容 ==========" sh """ xcodebuild clean \\ -project ${APP_DIR}/${projectName}.xcodeproj \\ -scheme ${SCHEME_NAME} \\ - -configuration ${configuration} + -configuration ${CONFIGURATION} \\ + MARKETING_VERSION=${versionName} \\ + CURRENT_PROJECT_VERSION=${versionCode} \\ + -destination 'generic/platform=iOS \\ + archive + """ + + } + } + stage('开始归档项目') { + steps { + sh """ + xcodebuild archive \\ + -project ${APP_DIR}/${projectName}.xcodeproj \\ + -scheme ${SCHEME_NAME} \\ + -configuration ${CONFIGURATION} \\ + -archivePath ${ARCHIVE_PATH} \\ + """ }