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 + """ + } } }