pindo 5.10.6 → 5.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pindo/base/funlog.rb +12 -1
  3. data/lib/pindo/base/pindocontext.rb +3 -0
  4. data/lib/pindo/command/android/autobuild.rb +62 -9
  5. data/lib/pindo/command/android/build.rb +6 -6
  6. data/lib/pindo/command/android/debug.rb +9 -9
  7. data/lib/pindo/command/android.rb +1 -1
  8. data/lib/pindo/command/appstore.rb +1 -1
  9. data/lib/pindo/command/deploy/build.rb +2 -4
  10. data/lib/pindo/command/deploy/cert.rb +4 -5
  11. data/lib/pindo/command/deploy/configproj.rb +3 -3
  12. data/lib/pindo/command/deploy/confusecode.rb +1 -1
  13. data/lib/pindo/command/deploy/confuseproj.rb +1 -1
  14. data/lib/pindo/command/deploy/pem.rb +3 -4
  15. data/lib/pindo/command/dev/autobuild.rb +1 -1
  16. data/lib/pindo/command/dev/build.rb +1 -1
  17. data/lib/pindo/command/dev/feishu.rb +1 -1
  18. data/lib/pindo/command/gplay/pullconfig.rb +48 -0
  19. data/lib/pindo/command/gplay.rb +7 -6
  20. data/lib/pindo/command/ios/adhoc.rb +6 -5
  21. data/lib/pindo/command/ios/autobuild.rb +24 -24
  22. data/lib/pindo/command/ios/build.rb +7 -6
  23. data/lib/pindo/command/ios/debug.rb +1 -0
  24. data/lib/pindo/command/ios.rb +1 -1
  25. data/lib/pindo/command/ipa/import.rb +2 -3
  26. data/lib/pindo/command/ipa/output.rb +2 -3
  27. data/lib/pindo/command/jps/upload.rb +6 -5
  28. data/lib/pindo/command/unity/apk.rb +19 -2
  29. data/lib/pindo/command/unity/autobuild.rb +58 -63
  30. data/lib/pindo/command/unity/initpack.rb +1 -1
  31. data/lib/pindo/command/unity/ipa.rb +17 -14
  32. data/lib/pindo/command/unity/pack.rb +1 -1
  33. data/lib/pindo/command/unity/upload.rb +1 -1
  34. data/lib/pindo/command/unity/web.rb +2 -2
  35. data/lib/pindo/command/utils/icon.rb +1 -1
  36. data/lib/pindo/command/utils/renewcert.rb +1 -2
  37. data/lib/pindo/command/utils/renewproj.rb +9 -10
  38. data/lib/pindo/command/web/autobuild.rb +2 -2
  39. data/lib/pindo/command/web/run.rb +1 -1
  40. data/lib/pindo/command.rb +2 -1
  41. data/lib/pindo/module/android/android_build_config_helper.rb +267 -35
  42. data/lib/pindo/module/android/android_build_helper.rb +300 -0
  43. data/lib/pindo/module/android/android_project_helper.rb +279 -0
  44. data/lib/pindo/module/android/gp_compliance_helper.rb +33 -87
  45. data/lib/pindo/module/android/gradle_helper.rb +524 -255
  46. data/lib/pindo/module/android/java_env_helper.rb +633 -0
  47. data/lib/pindo/module/android/keystore_helper.rb +1118 -0
  48. data/lib/pindo/module/appselect.rb +109 -0
  49. data/lib/pindo/module/appstore/appstore_in_app_purchase.rb +1 -1
  50. data/lib/pindo/module/build/{buildhelper.rb → build_helper.rb} +1 -2
  51. data/lib/pindo/module/build/{commonconfuseproj.rb → confuse_xcodeproj.rb} +2 -2
  52. data/lib/pindo/module/cert/cert_helper.rb +245 -0
  53. data/lib/pindo/module/cert/keychain_helper.rb +152 -0
  54. data/lib/pindo/module/cert/pem_helper.rb +67 -0
  55. data/lib/pindo/module/cert/xcodecerthelper.rb +2 -2
  56. data/lib/pindo/module/pgyer/pgyerhelper.rb +21 -1
  57. data/lib/pindo/module/{build/unityhelper.rb → unity/unity_helper.rb} +0 -17
  58. data/lib/pindo/module/xcode/{xcodereshandler.rb → res/xcode_res_handler.rb} +1 -1
  59. data/lib/pindo/module/xcode/{xcodebuildconfig.rb → xcode_build_config.rb} +7 -6
  60. data/lib/pindo/module/xcode/{xcodebuildhelper.rb → xcode_build_helper.rb} +4 -3
  61. data/lib/pindo/module/xcode/{xcodehelper.rb → xcode_project_helper.rb} +4 -2
  62. data/lib/pindo/module/xcode/{xcodereshelper.rb → xcode_res_helper.rb} +12 -9
  63. data/lib/pindo/version.rb +185 -7
  64. data/lib/pindo.rb +14 -9
  65. metadata +24 -23
  66. data/lib/pindo/module/android/apk_helper.rb +0 -138
  67. data/lib/pindo/module/android/base_helper.rb +0 -964
  68. data/lib/pindo/module/android/build_helper.rb +0 -128
  69. data/lib/pindo/module/android/so_helper.rb +0 -18
  70. data/lib/pindo/module/cert/certhelper.rb +0 -246
  71. data/lib/pindo/module/cert/keychainhelper.rb +0 -150
  72. data/lib/pindo/module/cert/pemhelper.rb +0 -65
  73. /data/lib/pindo/module/android/{androidreshelper.rb → android_res_helper.rb} +0 -0
  74. /data/lib/pindo/module/appstore/{iap_tier.json → appstore_iap_tier.json} +0 -0
  75. /data/lib/pindo/module/build/{swarkhelper.rb → swark_helper.rb} +0 -0
  76. /data/lib/pindo/module/build/{versionhelper.rb → version_helper.rb} +0 -0
  77. /data/lib/pindo/module/cert/{provisioninghelper.rb → provisioning_helper.rb} +0 -0
  78. /data/lib/pindo/module/unity/{nugethelper.rb → nuget_helper.rb} +0 -0
  79. /data/lib/pindo/module/xcode/{xcoderesconstant.rb → res/xcode_res_constant.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd33392e14ce3170db5963cd77255bc0b4f2c008c79a01579d726f8ef93037d0
4
- data.tar.gz: 61fe09946921347ad84bc991512b29a0eb64e23e470961ca579b6247d8bdf166
3
+ metadata.gz: 8c3d3d71327983e1e8b29cdfc374dc5190660bb879c9b57d3b1d232ae71abd49
4
+ data.tar.gz: 055b9e6700820d99291453b66ea5e50d3282b99f9d56f04bd4379d07202bbd90
5
5
  SHA512:
6
- metadata.gz: 9147ffd74728ab059dd4a5dbb760715735c29426c9746826ec65d01a19e411257a9e4b438e9c008bdfc3b757a759713023759fc8d8e23c190dc8f816bc31ec54
7
- data.tar.gz: '05328944fb21eb8f33617fe20c3eb68992d8eacc29f04d847edcd1f78c0441d61f7120cace4449c898b62fc4c96f264c6390234d8a6e19d71a30e66109cf98b6'
6
+ metadata.gz: dfa12cfe81ee2339b10b40756d8a1abfb34ff948a5ca3bea3e794ddc7c94e095a3e4e77814ea9fe30862f353fefabe1eb673982c31c3a0bd16faf7eb909a0216
7
+ data.tar.gz: dc83c15b2e492e07d2b5e15049df47987bdbc7f55da4bffae8bd8fa539e8dc21144cfa0cb1ed83efa373e83175fa431ad8cf90b0862836ff0d7e24860638a4c9
@@ -56,13 +56,20 @@ module Pindo
56
56
  puts " ✓ #{message}"
57
57
  end
58
58
 
59
- # 输出静态警告信息(不使用spinner,对应 fancyinfo_error
59
+ # 输出静态警告信息(不使用spinner)
60
60
  # @param args [Array] 要输出的消息
61
61
  def warning(*args)
62
62
  message = args.join(" ")
63
63
  puts "\e[33m ⚠ #{message}\e[0m"
64
64
  end
65
65
 
66
+ # 输出静态错误信息(不使用spinner,对应 fancyinfo_error)
67
+ # @param args [Array] 要输出的消息
68
+ def error(*args)
69
+ message = args.join(" ")
70
+ puts "\e[31m ✗ #{message}\e[0m"
71
+ end
72
+
66
73
  #-------------------------------------------------------------------------#
67
74
  #-------------------------------------------------------------------------#
68
75
  # @!group Singleton
@@ -113,6 +120,10 @@ module Pindo
113
120
  def warning(*args)
114
121
  instance.warning(*args)
115
122
  end
123
+
124
+ def error(*args)
125
+ instance.error(*args)
126
+ end
116
127
  end
117
128
 
118
129
  # Provides support for accessing the configuration instance in other
@@ -10,6 +10,7 @@ module Pindo
10
10
  TAG_DECISION = :tag_decision # 打Tag决定
11
11
  PROJECT_NAME = :project_name # 项目名称
12
12
  BUNDLE_ID = :bundle_id # Bundle ID
13
+ ANDROID_BUNDLE_NAME = :android_bundle_name # Android Bundle Name
13
14
  CERT_TYPE = :cert_type # 证书类型
14
15
  end
15
16
 
@@ -508,6 +509,8 @@ module Pindo
508
509
  case key.to_s
509
510
  when 'bundle_id'
510
511
  puts " Bundle ID: #{value}"
512
+ when 'android_bundle_name'
513
+ puts " Bundle Name: #{value}"
511
514
  when 'project_name', 'app_key' # 兼容旧的 app_key
512
515
  puts " 项目名称: #{value}"
513
516
  when 'tag_decision'
@@ -1,9 +1,9 @@
1
1
  require 'highline/import'
2
2
  require 'fileutils'
3
3
  require 'pindo/base/executable'
4
- require 'pindo/module/build/buildhelper'
5
- require 'pindo/module/build/versionhelper'
6
- require 'pindo/module/android/build_helper'
4
+ require 'pindo/module/build/build_helper'
5
+ require 'pindo/module/build/version_helper'
6
+ require 'pindo/module/android/android_build_helper'
7
7
  require 'pindo/module/android/android_build_config_helper'
8
8
 
9
9
  module Pindo
@@ -35,15 +35,18 @@ module Pindo
35
35
  $ pindo android autobuild --release # 编译Release包
36
36
  $ pindo android autobuild --upload # 编译并上传
37
37
  $ pindo android autobuild --send # 编译、上传并发送群组通知
38
+ $ pindo android autobuild --bundle_name=com.example.app # 使用指定bundle name的配置
38
39
 
39
40
  # CI/CD自动化构建
40
41
  $ PINDO_FORCE_BUILD=1 PINDO_PROJECT_NAME="Test Demo" PINDO_TAG_DECISION=new pindo android autobuild --upload
42
+ $ pindo android autobuild --bundle_name=com.example.app --upload --send # 使用配置并上传
41
43
  DESC
42
44
 
43
45
  def self.options
44
46
  [
45
47
  ['--release', '使用Release模式构建'],
46
48
  ['--proj=NAME', '指定上传到测试平台的项目名称'],
49
+ ['--bundle_name=NAME', '指定Android Package Name(如com.example.app,会拉取对应配置)'],
47
50
  ['--upload', '编译后上传到测试平台(自动发送给自己)'],
48
51
  ['--send', '发送通知到测试群组(同时发送给自己)']
49
52
  ].concat(super)
@@ -54,6 +57,7 @@ module Pindo
54
57
  @args_upload_flag = argv.flag?('upload', false)
55
58
  @args_send_flag = argv.flag?('send', false)
56
59
  @args_proj_name = argv.option('proj')
60
+ @args_bundle_name = argv.option('bundle_name')
57
61
 
58
62
 
59
63
  if @args_send_flag
@@ -70,14 +74,24 @@ module Pindo
70
74
  # 加载 JPS 配置(如果存在)
71
75
  context = Pindo::PindoContext.instance
72
76
  context.load_and_apply_jps_config(pindo_project_dir)
73
-
74
77
  # 确认并应用缓存(如果有)
75
78
  context.confirm_and_apply_cache
79
+
80
+
81
+ @main_bundle_name = nil
82
+ if @args_bundle_name
83
+ @main_bundle_name = @args_bundle_name
84
+ else
85
+ @main_bundle_name = get_selected_dev_bundle_name()
86
+ end
87
+
88
+
76
89
  build_helper = Pindo::BuildHelper.share_instance
77
90
  project_type = build_helper.project_type(pindo_project_dir)
78
91
 
79
92
  args_temp = []
80
93
  args_temp << "--proj=#{@args_proj_name}" if @args_proj_name
94
+ args_temp << "--bundle_name=#{@main_bundle_name}" if @main_bundle_name
81
95
  args_temp << "--upload" if @args_upload_flag
82
96
  args_temp << "--send" if @args_send_flag
83
97
 
@@ -113,15 +127,15 @@ module Pindo
113
127
 
114
128
  # ===== 使用 workflow 配置更新 Android 项目 =====
115
129
  if workflow_info && workflow_info[:package_name]
116
- package_name = workflow_info[:package_name]
130
+ workflow_packname = workflow_info[:package_name]
117
131
 
118
132
  puts "\n使用工作流配置更新 Android 项目:"
119
- puts " Package Name: #{package_name}"
133
+ puts " Workflow Package Name: #{workflow_packname}"
120
134
 
121
135
  # 一次性更新 App Name、Application ID 和 URL Schemes
122
- Pindo::AndroidBuildConfigHelper.update_project_with_packagename(
136
+ Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
123
137
  project_dir: pindo_project_dir,
124
- package_name: package_name
138
+ workflow_packname: workflow_packname
125
139
  )
126
140
  else
127
141
  raise Informative, "未获取到工作流信息"
@@ -157,6 +171,46 @@ module Pindo
157
171
  Funlog.warning("非Git仓库,保持工程原有版本号")
158
172
  end
159
173
 
174
+
175
+ # ===== 如果指定了 bundle_name,覆盖 Application ID 和 google-services.json =====
176
+ # 注意:这必须在 update_project_with_workflow 之后,以覆盖工作流的默认配置
177
+ if @main_bundle_name && !@main_bundle_name.empty?
178
+ puts "\n正在处理指定的 Bundle Name: #{@main_bundle_name}..."
179
+
180
+ # 检查是否为通配符或通用 bundle_name
181
+ # 如果是 com.test.* 或 com.test 这样的通配符,跳过配置更新
182
+ is_wildcard = @main_bundle_name.include?('*') ||
183
+ @main_bundle_name.end_with?('.') ||
184
+ ['com.test', 'com.example', 'com.demo'].include?(@main_bundle_name)
185
+
186
+ if is_wildcard
187
+ puts " ⚠️ 检测到通配符或通用 Bundle Name: #{@main_bundle_name}"
188
+ puts " ⚠️ 跳过 google-services.json 和 Application ID 更新"
189
+ else
190
+ # 只有具体的 bundle_name 才执行配置更新
191
+ # 直接使用 clong_buildconfig_repo 拉取配置仓库
192
+ config_repo_dir = clong_buildconfig_repo(repo_name: @main_bundle_name)
193
+
194
+ if config_repo_dir && File.exist?(config_repo_dir)
195
+ # 1. 拷贝 google-services.json 到 launcher 目录
196
+ Pindo::AndroidBuildConfigHelper.copy_google_services_from_config_repo(
197
+ config_repo_dir: config_repo_dir,
198
+ project_dir: pindo_project_dir
199
+ )
200
+
201
+ # 2. 更新 Application ID 为指定的 bundle_name(覆盖工作流设置)
202
+ Pindo::AndroidBuildConfigHelper.update_application_id(
203
+ project_dir: pindo_project_dir,
204
+ application_id: @main_bundle_name
205
+ )
206
+
207
+ puts " ✓ Bundle Name 配置处理完成"
208
+ else
209
+ raise Informative, "无法获取配置仓库"
210
+ end
211
+ end
212
+ end
213
+
160
214
  build_helper = Pindo::BuildHelper.share_instance
161
215
  if @args_upload_flag
162
216
  is_need_add_tag,tag_action_parms = build_helper.check_is_need_add_tag?(pindo_project_dir)
@@ -223,7 +277,6 @@ module Pindo
223
277
  raise e
224
278
  end
225
279
 
226
-
227
280
  end
228
281
  end
229
282
  end
@@ -1,8 +1,8 @@
1
1
  require 'highline/import'
2
2
  require 'fileutils'
3
3
  require 'json'
4
- require 'pindo/module/build/buildhelper'
5
- require 'pindo/module/android/build_helper'
4
+ require 'pindo/module/build/build_helper'
5
+ require 'pindo/module/android/android_build_helper'
6
6
 
7
7
  module Pindo
8
8
  class Command
@@ -99,15 +99,15 @@ module Pindo
99
99
 
100
100
  # ===== 使用 workflow 配置更新 Android 项目 =====
101
101
  if workflow_info && workflow_info[:package_name]
102
- package_name = workflow_info[:package_name]
102
+ workflow_packname = workflow_info[:package_name]
103
103
 
104
104
  puts "\n使用工作流配置更新 Android 项目:"
105
- puts " Package Name: #{package_name}"
105
+ puts " Workflow Package Name: #{workflow_packname}"
106
106
 
107
107
  # 一次性更新 App Name、Application ID 和 URL Schemes
108
- Pindo::AndroidBuildConfigHelper.update_project_with_packagename(
108
+ Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
109
109
  project_dir: pindo_project_dir,
110
- package_name: package_name
110
+ workflow_packname: workflow_packname
111
111
  )
112
112
  else
113
113
  raise Informative, "未获取到工作流信息"
@@ -71,11 +71,11 @@ module Pindo
71
71
  def run
72
72
  pindo_project_dir = Dir.pwd
73
73
 
74
- # 如果设置了 dsign 标志,则执行签名文件获取并直接返回
75
- if @args_dsign_flag
76
- Pindo::AndroidBuildHelper.share_instance.dsign(pindo_project_dir, !@args_release_flag)
77
- return
78
- end
74
+ # # 如果设置了 dsign 标志,则执行签名文件获取并直接返回
75
+ # if @args_dsign_flag
76
+ # Pindo::AndroidBuildHelper.share_instance.dsign(pindo_project_dir, !@args_release_flag)
77
+ # return
78
+ # end
79
79
 
80
80
 
81
81
  app_info_obj = nil
@@ -91,15 +91,15 @@ module Pindo
91
91
 
92
92
  # ===== 使用 workflow 配置更新 Android 项目 =====
93
93
  if workflow_info && workflow_info[:package_name]
94
- package_name = workflow_info[:package_name]
94
+ workflow_packname = workflow_info[:package_name]
95
95
 
96
96
  puts "\n使用工作流配置更新 Android 项目:"
97
- puts " Package Name: #{package_name}"
97
+ puts " Workflow Package Name: #{workflow_packname}"
98
98
 
99
99
  # 一次性更新 App Name、Application ID 和 URL Schemes
100
- Pindo::AndroidBuildConfigHelper.update_project_with_packagename(
100
+ Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
101
101
  project_dir: pindo_project_dir,
102
- package_name: package_name
102
+ workflow_packname: workflow_packname
103
103
  )
104
104
  else
105
105
  raise Informative, "未获取到工作流信息"
@@ -8,7 +8,7 @@ module Pindo
8
8
  class Command
9
9
  class Android < Command
10
10
  self.abstract_command = true
11
- self.summary = 'Android相关命令'
11
+ self.summary = 'Android开发相关命令'
12
12
  self.command = 'and'
13
13
  # self.command_name = 'and'
14
14
 
@@ -10,7 +10,7 @@ module Pindo
10
10
 
11
11
  class Appstore < Command
12
12
  self.abstract_command = true
13
- self.summary = 'appstore的相关命令'
13
+ self.summary = 'AppStore提交发布相关命令'
14
14
  end
15
15
 
16
16
  end
@@ -3,15 +3,13 @@ require 'fileutils'
3
3
  require 'json'
4
4
  require 'xcodeproj'
5
5
  require 'gym'
6
- require 'pindo/module/xcode/xcodebuildhelper'
6
+ require 'pindo/module/xcode/xcode_build_helper'
7
7
 
8
8
  module Pindo
9
9
  class Command
10
10
  class Deploy < Command
11
11
  class Build < Deploy
12
12
 
13
- include Pindo::XcodeBuildHelper
14
-
15
13
  self.summary = '编译工程'
16
14
 
17
15
  self.description = <<-DESC
@@ -75,7 +73,7 @@ module Pindo
75
73
  project_fullname = Dir.glob(File.join(new_project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
76
74
 
77
75
  # 修复 Xcode 16 链接器兼容性问题
78
- fix_xcode16_linker_flags(project_dir: new_project_dir)
76
+ Pindo::XcodeBuildHelper.fix_xcode16_linker_flags(project_dir: new_project_dir)
79
77
 
80
78
  if File.exist?(File.join(new_project_dir, "build"))
81
79
  FileUtils.rm_rf(File.join(new_project_dir, "build"))
@@ -1,8 +1,8 @@
1
1
  require 'fileutils'
2
2
  require 'match'
3
- require 'pindo/module/build/swarkhelper'
3
+ require 'pindo/module/build/swark_helper'
4
4
  require 'pindo/module/cert/xcodecerthelper'
5
- require 'pindo/module/cert/certhelper'
5
+ require 'pindo/module/cert/cert_helper'
6
6
 
7
7
  module Pindo
8
8
  class Command
@@ -11,7 +11,6 @@ module Pindo
11
11
 
12
12
  include Command::DeployOptions
13
13
  include XcodeCertHelper
14
- include CertHelper
15
14
  include SwarkHelper
16
15
 
17
16
 
@@ -121,9 +120,9 @@ module Pindo
121
120
  cert_reponame = cert_git_url.split("/").last.chomp(".git")
122
121
  certs_dir = getcode_to_dir(reponame:cert_reponame, remote_url:cert_git_url, path: pindo_single_config.pindo_dir, new_branch:@apple_id)
123
122
 
124
- install_certs(cert_url:cert_git_url, certs_dir:certs_dir, cert_type:@build_type, platform_type:platform_type)
123
+ Pindo::CertHelper.install_certs(cert_url:cert_git_url, certs_dir:certs_dir, cert_type:@build_type, platform_type:platform_type)
125
124
  bundle_id_map = get_bundle_id_map
126
- provisioning_info_array = install_provisionfiles(cert_url:cert_git_url, certs_dir:certs_dir, bundle_id_map:bundle_id_map, cert_type:@build_type, platform_type:platform_type)
125
+ provisioning_info_array = Pindo::CertHelper.install_provisionfiles(cert_url:cert_git_url, certs_dir:certs_dir, bundle_id_map:bundle_id_map, cert_type:@build_type, platform_type:platform_type)
127
126
  pindo_single_config.set_cert_info(dict: provisioning_info_array)
128
127
  end
129
128
 
@@ -1,9 +1,10 @@
1
1
 
2
2
  require 'find'
3
3
  require 'cocoapods-core'
4
- require 'pindo/module/xcode/xcodebuildhelper'
4
+ require 'pindo/module/xcode/xcode_build_helper'
5
5
  require 'pindo/module/xcode/xcodeappconfig'
6
- require 'pindo/module/build/swarkhelper'
6
+ require 'pindo/module/xcode/xcode_res_helper'
7
+ require 'pindo/module/build/swark_helper'
7
8
 
8
9
  module Pindo
9
10
  class Command
@@ -12,7 +13,6 @@ module Pindo
12
13
 
13
14
  include Command::DeployOptions
14
15
 
15
- include XcodeBuildHelper
16
16
  include XcodeAppConfig
17
17
  include XcodeCertHelper
18
18
 
@@ -10,7 +10,7 @@ module Pindo
10
10
 
11
11
  include Command::DeployOptions
12
12
 
13
- include CommonConfuseProj
13
+ include ConfuseXcodeProj
14
14
 
15
15
  self.summary = '替换混淆名称'
16
16
 
@@ -13,7 +13,7 @@ module Pindo
13
13
 
14
14
  include Command::DeployOptions
15
15
 
16
- include CommonConfuseProj
16
+ include ConfuseXcodeProj
17
17
 
18
18
  self.summary = '给Xcode添加混淆设置'
19
19
 
@@ -6,9 +6,8 @@ module Pindo
6
6
  class Deploy < Command
7
7
  class Pem < Deploy
8
8
 
9
- require 'pindo/module/cert/pemhelper'
9
+ require 'pindo/module/cert/pem_helper'
10
10
  include Command::DeployOptions
11
- include PemHelper
12
11
 
13
12
  self.summary = '创建App的push证书'
14
13
 
@@ -22,7 +21,7 @@ module Pindo
22
21
 
23
22
  def run
24
23
 
25
- login(apple_id:@apple_id)
24
+ Pindo::PemHelper.login(apple_id:@apple_id)
26
25
 
27
26
  pem_type="prod"
28
27
  if @args_dev_flag
@@ -34,7 +33,7 @@ module Pindo
34
33
  FileUtils.mkdir_p(push_path) unless File.exist?(push_path)
35
34
  puts push_path
36
35
 
37
- x509_cert_path = create_certificate(bundle_id:@bundle_id,type: pem_type, output_path:push_path);
36
+ x509_cert_path = Pindo::PemHelper.create_certificate(bundle_id:@bundle_id,type: pem_type, output_path:push_path);
38
37
 
39
38
  if File.exist?(x509_cert_path) && File.exist?(push_path)
40
39
  app_config_dir = clong_buildconfig_repo(repo_name: @deploy_repo_name)
@@ -3,7 +3,7 @@ require 'xcodeproj'
3
3
  require 'find'
4
4
  require 'fileutils'
5
5
  require 'pindo/base/executable'
6
- require 'pindo/module/build/buildhelper'
6
+ require 'pindo/module/build/build_helper'
7
7
 
8
8
  module Pindo
9
9
  class Command
@@ -3,7 +3,7 @@ require 'fileutils'
3
3
  require 'json'
4
4
  require 'xcodeproj'
5
5
  require 'gym'
6
- require 'pindo/module/build/buildhelper'
6
+ require 'pindo/module/build/build_helper'
7
7
 
8
8
  module Pindo
9
9
  class Command
@@ -1,7 +1,7 @@
1
1
  require 'highline/import'
2
2
  require 'fileutils'
3
3
  require 'pindo/client/feishuclient'
4
- require 'pindo/module/build/buildhelper'
4
+ require 'pindo/module/build/build_helper'
5
5
  require 'pindo/module/pgyer/pgyerhelper'
6
6
 
7
7
  module Pindo
@@ -0,0 +1,48 @@
1
+ require 'fileutils'
2
+
3
+ module Pindo
4
+ class Command
5
+ class Gplay < Command
6
+ class Pullconfig < Gplay
7
+
8
+ self.summary = '下载并更新Google Play应用配置仓库'
9
+
10
+ self.description = <<-DESC
11
+ 下载并更新Google Play应用配置仓库
12
+
13
+ 使用示例:
14
+ pindo gplay pullconfig com.example.app
15
+ DESC
16
+
17
+ self.arguments = [
18
+ CLAide::Argument.new('bundle_name', true)
19
+ ]
20
+
21
+ def initialize(argv)
22
+ @bundle_name = argv.shift_argument
23
+ super
24
+ @additional_args = argv.remainder!
25
+ end
26
+
27
+ def validate!
28
+ super
29
+
30
+ if @bundle_name.nil?
31
+ say "You need input a bundle name"
32
+ @bundle_name = ask('Bundle Name: ') || nil
33
+ end
34
+ help! 'You need input a bundle name' if @bundle_name.nil? || @bundle_name.empty?
35
+ end
36
+
37
+ def run
38
+ # 克隆配置仓库(使用继承的方法)
39
+ app_config_dir = clong_buildconfig_repo(repo_name: @bundle_name)
40
+
41
+ # 返回配置仓库路径
42
+ app_config_dir
43
+ end
44
+
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,16 +1,17 @@
1
1
 
2
- require 'pindo/command/gplay/iap'
3
- require 'pindo/command/gplay/itcapp'
4
- require 'pindo/command/gplay/metadata'
5
- require 'pindo/command/gplay/screenshots'
6
- require 'pindo/command/gplay/upload'
2
+ # require 'pindo/command/gplay/iap'
3
+ # require 'pindo/command/gplay/itcapp'
4
+ # require 'pindo/command/gplay/metadata'
5
+ require 'pindo/command/gplay/pullconfig'
6
+ # require 'pindo/command/gplay/screenshots'
7
+ # require 'pindo/command/gplay/upload'
7
8
 
8
9
  module Pindo
9
10
  class Command
10
11
 
11
12
  class Gplay < Command
12
13
  self.abstract_command = true
13
- self.summary = 'Google Play商店的相关命令'
14
+ self.summary = 'Google Play提交发布相关命令'
14
15
  end
15
16
 
16
17
  end
@@ -1,8 +1,9 @@
1
1
  require 'highline/import'
2
2
  require 'xcodeproj'
3
- require 'find'
3
+ require 'find'
4
4
  require 'fileutils'
5
5
  require 'pindo/base/executable'
6
+ require 'pindo/module/xcode/xcode_build_config'
6
7
 
7
8
  module Pindo
8
9
  class Command
@@ -92,15 +93,15 @@ module Pindo
92
93
 
93
94
  # ===== 使用 workflow 配置更新项目 =====
94
95
  if workflow_info && workflow_info[:package_name]
95
- package_name = workflow_info[:package_name]
96
+ workflow_packname = workflow_info[:package_name]
96
97
 
97
98
  puts "\n使用工作流配置更新 iOS 项目:"
98
- puts " Package Name: #{package_name}"
99
+ puts " Workflow Package Name: #{workflow_packname}"
99
100
 
100
101
  # 一次性更新 Display Name、Bundle ID 和 URL Schemes
101
- Pindo::XcodeBuildConfig.update_project_with_packagename(
102
+ Pindo::XcodeBuildConfig.update_project_with_workflow(
102
103
  project_dir: project_dir,
103
- package_name: package_name
104
+ workflow_packname: workflow_packname
104
105
  )
105
106
  else
106
107
  raise Informative, "未获取到工作流信息"
@@ -3,9 +3,9 @@ require 'xcodeproj'
3
3
  require 'find'
4
4
  require 'fileutils'
5
5
  require 'pindo/base/executable'
6
- require 'pindo/module/build/buildhelper'
7
- require 'pindo/module/build/versionhelper'
8
- require 'pindo/module/xcode/xcodebuildconfig'
6
+ require 'pindo/module/build/build_helper'
7
+ require 'pindo/module/build/version_helper'
8
+ require 'pindo/module/xcode/xcode_build_config'
9
9
  require 'pindo/base/pindocontext'
10
10
 
11
11
  module Pindo
@@ -91,10 +91,22 @@ module Pindo
91
91
  # 加载 JPS 配置(如果存在)
92
92
  context = Pindo::PindoContext.instance
93
93
  context.load_and_apply_jps_config(pindo_project_dir)
94
-
95
94
  # 确认并应用缓存(如果有)
96
95
  context.confirm_and_apply_cache
97
96
 
97
+
98
+ @mainapp_bundleid= nil
99
+ if @args_bundle_id
100
+ @mainapp_bundleid = @args_bundle_id
101
+ else
102
+ if @args_deploy_flag
103
+ @mainapp_bundleid = get_selected_deploy_bundleid()
104
+ else
105
+ @mainapp_bundleid = get_selected_dev_bundleid()
106
+ end
107
+ end
108
+
109
+
98
110
  build_helper = Pindo::BuildHelper.share_instance
99
111
  project_type = build_helper.project_type(pindo_project_dir)
100
112
 
@@ -102,7 +114,7 @@ module Pindo
102
114
  args_temp << "--proj=#{@args_proj_name}" if @args_proj_name
103
115
  args_temp << "--upload" if @args_upload_flag
104
116
  args_temp << "--send" if @args_send_flag
105
- args_temp << "--bundleid=#{@args_bundle_id}" if @args_bundle_id
117
+ args_temp << "--bundleid=#{@mainapp_bundleid}" if @mainapp_bundleid
106
118
  case project_type
107
119
  when :ios
108
120
  ios_autobuild
@@ -133,19 +145,7 @@ module Pindo
133
145
  if !new_project_fullname.nil? && File.exist?(new_project_fullname)
134
146
  build_helper.delete_libtarget_firebase_shell(pindo_project_dir)
135
147
  end
136
-
137
-
138
- mainapp_bundleid= nil
139
- puts "args_bundle_id: #{@args_bundle_id}"
140
- if @args_bundle_id
141
- mainapp_bundleid = @args_bundle_id
142
- else
143
- if @args_deploy_flag
144
- mainapp_bundleid = get_selected_deploy_bundleid()
145
- else
146
- mainapp_bundleid = get_selected_dev_bundleid()
147
- end
148
- end
148
+
149
149
 
150
150
  app_info_obj = nil
151
151
  workflow_info = nil
@@ -159,16 +159,16 @@ module Pindo
159
159
 
160
160
  # ===== 使用 workflow 配置更新项目 =====
161
161
  if workflow_info && workflow_info[:package_name]
162
- package_name = workflow_info[:package_name]
162
+ workflow_packname = workflow_info[:package_name]
163
163
  project_id = app_info_obj ? app_info_obj["id"] : nil
164
164
 
165
165
  puts "\n使用工作流配置更新 iOS 项目:"
166
- puts " Package Name: #{package_name}"
166
+ puts " Workflow Package Name: #{workflow_packname}"
167
167
 
168
168
  # 一次性更新 Display Name、Bundle ID、URL Schemes 和 JPS 快捷操作
169
- Pindo::XcodeBuildConfig.update_project_with_packagename(
169
+ Pindo::XcodeBuildConfig.update_project_with_workflow(
170
170
  project_dir: pindo_project_dir,
171
- package_name: package_name,
171
+ workflow_packname: workflow_packname,
172
172
  project_id: project_id
173
173
  )
174
174
  else
@@ -206,7 +206,7 @@ module Pindo
206
206
  end
207
207
 
208
208
  args_temp = []
209
- args_temp << mainapp_bundleid
209
+ args_temp << @mainapp_bundleid
210
210
  Pindo::Command::Deploy::Pullconfig::run(args_temp)
211
211
 
212
212
  Dir.chdir(pindo_project_dir)
@@ -272,7 +272,7 @@ module Pindo
272
272
  # 因为 Cert::run 可能会修改 PRODUCT_BUNDLE_IDENTIFIER
273
273
  Pindo::XcodeBuildConfig.update_url_schemes_with_bundleid(
274
274
  project_dir: pindo_project_dir,
275
- package_name: package_name
275
+ package_name: workflow_packname
276
276
  )
277
277
 
278
278
  Dir.chdir(pindo_project_dir)