Explorar el Código

feat: 增加 fastlane 配置

陈文艺 hace 5 meses
padre
commit
d9728f014f
Se han modificado 2 ficheros con 41 adiciones y 0 borrados
  1. 5 0
      .fastlane/Appfile
  2. 36 0
      Fastfile

+ 5 - 0
.fastlane/Appfile

@@ -0,0 +1,5 @@
+app_identifier "om.jiehe.mimo.debugs"  # 你的Bundle ID
+apple_id "mail_onee@126.com"      # 你的Apple ID
+
+# 如果你使用多个团队,可以指定团队ID
+team_id "5H8D98R72W"                    # 你的团队ID

+ 36 - 0
Fastfile

@@ -0,0 +1,36 @@
+default_platform(:ios)
+
+platform :ios do
+  desc "编译iOS项目并生成IPA"
+  lane :build do
+    # 清理之前的构建
+    clear_derived_data
+    
+    # 配置项目信息
+    project_name = "MiMoLive.xcworkspace"  # 替换为你的项目名称
+    scheme_name = "MiMoLive"              # 替换为你的Scheme名称
+    output_directory = "./build"            # 输出目录
+    
+    # 创建输出目录
+    sh "mkdir -p #{output_directory}"
+    
+    # 编译项目
+    gym(
+      project: project_name,
+      scheme: scheme_name,
+      clean: true,
+      configuration: "Release",
+      output_directory: output_directory,
+      output_name: "MiMoLive",           # 生成的IPA名称
+      export_method: "ad-hoc",              # 导出方式:app-store, ad-hoc, enterprise, development
+      export_options: {
+        provisioningProfiles: {
+          "com.jiehe.mimo.debugs" => "/var/jenkins_home/iOS Files/DebugsProfile.mobileprovision"  # 替换为你的Bundle ID和描述文件名称
+        }
+      }
+    )
+    
+    # 输出构建结果路径
+    UI.message("IPA文件已生成: #{output_directory}")
+  end
+end