pindo 4.8.7 → 4.8.8

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.
@@ -0,0 +1,189 @@
1
+ require 'highline/import'
2
+ require 'xcodeproj'
3
+ require 'find'
4
+ require 'fileutils'
5
+ require 'pindo/base/executable'
6
+
7
+ module Pindo
8
+ class Command
9
+ class Ios < Command
10
+ class Debug < Ios
11
+
12
+ include Appselect
13
+ # 命令的简要说明 - 打包iOS工程并发布到蒲公英
14
+ self.summary = '打包iOS工程并发布到蒲公英'
15
+
16
+ # 命令的详细说明,包含用法示例
17
+ self.description = <<-DESC
18
+ 编译iOS Debug包并支持上传到测试平台。
19
+
20
+ 支持功能:
21
+
22
+ * 编译Debug包
23
+
24
+ * 上传到测试平台
25
+
26
+ * 发送测试通知
27
+
28
+ 使用示例:
29
+
30
+ $ pindo ios debug # 编译Debug包
31
+
32
+ $ pindo ios debug --upload # 编译并上传
33
+
34
+ $ pindo ios debug --send # 编译上传并发送通知
35
+
36
+ $ pindo ios debug --proj=myapp # 指定项目名称
37
+ DESC
38
+
39
+ # 命令的参数列表
40
+ self.arguments = [
41
+ # 暂无参数
42
+ ]
43
+
44
+ # 命令的选项列表
45
+ def self.options
46
+ [
47
+ # 指定上传到蒲公英的项目
48
+ ['--proj', '指定上传到测试平台的项目名称'],
49
+ # 上传编译包
50
+ ['--upload', '上传编译后的ipa到测试平台'],
51
+ # 发送通知
52
+ ['--send', '上传成功后发送测试通知']
53
+ ].concat(super)
54
+ end
55
+
56
+ def initialize(argv)
57
+
58
+ @args_deploy_flag = argv.flag?('deploy', false)
59
+ @args_adhoc_flag = argv.flag?('adhoc', false)
60
+ @args_upload_flag = argv.flag?('upload', false)
61
+ @args_send_flag = argv.flag?('send', false)
62
+ @args_proj_name = argv.option('proj')
63
+
64
+ if @args_send_flag
65
+ @args_upload_flag = true
66
+ end
67
+
68
+ super
69
+ @additional_args = argv.remainder!
70
+ end
71
+
72
+ def validate!
73
+
74
+ super
75
+ end
76
+
77
+ def run
78
+
79
+ mainapp_bundleid= nil
80
+ if @args_deploy_flag
81
+ mainapp_bundleid = get_selected_deploy_bundleid()
82
+ else
83
+ mainapp_bundleid = get_selected_dev_bundleid()
84
+ end
85
+
86
+ app_info_obj = nil
87
+ if @args_upload_flag
88
+ proj_name = @args_proj_name
89
+ app_info_obj = PgyerHelper.share_instace.prepare_upload(working_directory:Dir.pwd, proj_name:proj_name)
90
+ end
91
+
92
+ args_temp = []
93
+ args_temp << mainapp_bundleid
94
+ Pindo::Command::Deploy::Pullconfig::run(args_temp)
95
+
96
+ project_dir = Dir.pwd
97
+ Dir.chdir(project_dir)
98
+ config_json_file = File.join(project_dir,"config.json")
99
+ Cert::modify_cert_with_project(project_dir:project_dir, config_file:config_json_file)
100
+
101
+ if File.exist?(File.join(project_dir, "Podfile"))
102
+
103
+ args_temp = []
104
+ args_temp << config_json_file
105
+ Pindo::Command::Lib::Update::run([])
106
+
107
+ begin
108
+ if File.exist?(File.join(project_dir, "Podfile.lock"))
109
+ FileUtils.rm_rf(File.join(project_dir, "Podfile.lock"))
110
+ end
111
+ if File.exist?(File.join(project_dir,"Pods"))
112
+ FileUtils.rm_rf(File.join(project_dir, "Pods"))
113
+ end
114
+ puts "正在执行pod deintegrate..."
115
+ system 'pod deintegrate'
116
+ puts "正在执行pod install..."
117
+ system 'pod install'
118
+ rescue => error
119
+ puts(error.to_s)
120
+ raise Informative, "pod install失败!!先pod install 完成后成编译 !"
121
+ end
122
+
123
+ Dir.chdir(project_dir)
124
+ pod_lock_file = File.join(project_dir, "Podfile.lock")
125
+ if !File.exist?(pod_lock_file)
126
+ raise Informative, "pod install失败!!先pod install 完成后成编译 !"
127
+ end
128
+
129
+ end
130
+
131
+
132
+ args_temp = []
133
+ if @args_adhoc_flag
134
+ args_temp << "--adhoc"
135
+ else
136
+ args_temp << "--dev"
137
+ end
138
+
139
+ project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
140
+ if !project_fullname.nil?
141
+ project_obj = Xcodeproj::Project.open(project_fullname)
142
+ project_build_platform = project_obj.root_object.build_configuration_list.get_setting("SDKROOT")["Release"]
143
+ if !project_build_platform.nil? && project_build_platform.eql?("macosx")
144
+ @args_macos_flag = true
145
+ end
146
+ end
147
+
148
+ if @args_macos_flag
149
+ args_temp << "--macos"
150
+ end
151
+
152
+ Pindo::Command::Deploy::Cert::run(args_temp)
153
+
154
+ Dir.chdir(project_dir)
155
+ Pindo::Command::Deploy::Build::run(args_temp)
156
+
157
+
158
+ pindo_new_project_dir = Dir.pwd
159
+ build_path = File.join(pindo_new_project_dir, "build", "*.{ipa,app}")
160
+ ipa_file_upload = Dir.glob(build_path).max_by {|f| File.mtime(f)}
161
+
162
+ if !ipa_file_upload.nil? && !app_info_obj.nil?
163
+ description = nil
164
+ if File.exist?(File.join(pindo_new_project_dir, ".release_info"))
165
+ description = File.read(File.join(pindo_new_project_dir, ".release_info"))
166
+ else
167
+ if File.exist?(File.join(pindo_new_project_dir, ".git"))
168
+ description = git!(%W(-C #{pindo_new_project_dir} show -s --format=%h::%s)).strip
169
+ end
170
+ end
171
+ result_data = PgyerHelper.share_instace.start_upload(app_info_obj:app_info_obj, ipa_file_upload:ipa_file_upload, description:description)
172
+ if !result_data.nil? && !result_data["data"].nil? && !result_data["data"]["id"].nil?
173
+ msg_data = PgyerHelper.share_instace.make_msg_data(app_info_obj:app_info_obj, app_version_info_obj:result_data["data"])
174
+ PgyerHelper.share_instace.print_app_version_info(msg_data:msg_data)
175
+ if @args_send_flag
176
+ PgyerHelper.share_instace.send_apptest_wechat_msg(msg_data:msg_data)
177
+ end
178
+ end
179
+ end
180
+
181
+ system "open #{project_dir}"
182
+
183
+ end
184
+
185
+ end
186
+ end
187
+ end
188
+ end
189
+
@@ -0,0 +1,18 @@
1
+
2
+ require 'pindo/command/ios/cert'
3
+ require 'pindo/command/ios/build'
4
+ require 'pindo/command/ios/debug'
5
+ require 'pindo/command/ios/adhoc'
6
+ require 'pindo/command/ios/autoresign'
7
+ require 'pindo/command/ios/applovin'
8
+
9
+ module Pindo
10
+ class Command
11
+
12
+ class Ios < Command
13
+ self.abstract_command = true
14
+ self.summary = 'iOS相关命令'
15
+ end
16
+
17
+ end
18
+ end
@@ -67,8 +67,12 @@ module Pindo
67
67
  msg_data = PgyerHelper.share_instace.make_msg_data(app_info_obj:app_info_obj, app_version_info_obj:version_item_obj)
68
68
 
69
69
  PgyerHelper.share_instace.print_app_version_info(msg_data:msg_data)
70
+
70
71
  if @args_send_flag
71
- PgyerHelper.share_instace.send_apptest_wechat_msg(msg_data:msg_data)
72
+ # PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "PreFavTest", receiveType:"chat")
73
+ # PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "DevTest", receiveType:"chat")
74
+ else
75
+ PgyerHelper.share_instace.send_apptest_msg(appId:app_info_obj["appId"], appVersionId:version_item_obj["id"], chatEnv: "", receiveType:"self")
72
76
  end
73
77
 
74
78
  end
@@ -86,15 +86,15 @@ module Pindo
86
86
 
87
87
  current_project_dir = Dir.pwd
88
88
  if @args_ipa_file.nil? || !File.exist?(@args_ipa_file)
89
- build_path = File.join(current_project_dir, "build", "*.{ipa,app}")
89
+ build_path = File.join(current_project_dir, "build", "*.{ipa,app,apk}")
90
90
  @args_ipa_file = Dir.glob(build_path).max_by {|f| File.mtime(f)}
91
91
  if @args_ipa_file.nil?
92
- build_path = File.join(current_project_dir, "*.ipa")
92
+ build_path = File.join(current_project_dir, "*.{ipa,app,apk}")
93
93
  @args_ipa_file = Dir.glob(build_path).max_by {|f| File.mtime(f)}
94
94
  end
95
95
 
96
96
  if !@args_ipa_file.nil?
97
- answer = agree("需要上传的ipa文件是: #{@args_ipa_file} ?(Y/n)")
97
+ answer = agree("需要上传的文件是: #{@args_ipa_file} ?(Y/n)")
98
98
  if !answer
99
99
  @args_ipa_file = nil
100
100
  end
@@ -102,7 +102,7 @@ module Pindo
102
102
 
103
103
  if !@args_ipa_file.nil? && File.exist?(@args_ipa_file)
104
104
  else
105
- @args_ipa_file = ask('需要上传的IPA文件:') || nil
105
+ @args_ipa_file = ask('需要上传的文件:') || nil
106
106
  @args_ipa_file = @args_ipa_file.strip.gsub(/\\ /, ' ')
107
107
  end
108
108
  end
@@ -0,0 +1,76 @@
1
+ require 'highline/import'
2
+ require 'xcodeproj'
3
+ require 'find'
4
+ require 'fileutils'
5
+ require 'pindo/base/executable'
6
+
7
+
8
+ module Pindo
9
+ class Command
10
+ class Unity < Command
11
+ class Apk < Unity
12
+
13
+ # 命令的简要说明 - 编译Unity工程生成Android APK
14
+ self.summary = '编译Unity工程生成Android APK'
15
+
16
+ # 命令的详细说明,包含用法示例
17
+ self.description = <<-DESC
18
+ 编译Unity工程生成Android APK。
19
+
20
+ 支持功能:
21
+
22
+ * 编译生成APK
23
+
24
+ * 上传到测试平台
25
+
26
+ * 发送测试通知
27
+
28
+ 使用示例:
29
+
30
+ $ pindo unity apk # 编译APK
31
+
32
+ $ pindo unity apk --upload # 编译并上传
33
+
34
+ $ pindo unity apk --send # 编译并上传并发送通知
35
+
36
+ $ pindo unity apk --proj=myapp # 指定项目名称
37
+ DESC
38
+
39
+ # 命令的参数列表
40
+ self.arguments = [
41
+
42
+ ]
43
+
44
+ # 命令的选项列表
45
+ def self.options
46
+ [
47
+ # 指定上传到蒲公英的项目
48
+ ['--proj', '指定上传到测试平台的项目名称'],
49
+ # 上传编译包
50
+ ['--upload', '上传编译后的APK到测试平台'],
51
+ # 发送通知
52
+ ['--send', '上传成功后发送测试通知']
53
+ ].concat(super)
54
+ end
55
+
56
+ def initialize(argv)
57
+
58
+ @args_proj_name = argv.option('proj')
59
+ @args_upload_flag = argv.flag?('upload', false)
60
+ @args_send_flag = argv.flag?('send', false)
61
+
62
+ if @args_send_flag
63
+ @args_upload_flag = true
64
+ end
65
+
66
+ super
67
+ end
68
+
69
+ def run
70
+ puts "apk"
71
+ end
72
+
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,76 @@
1
+ require 'highline/import'
2
+ require 'xcodeproj'
3
+ require 'find'
4
+ require 'fileutils'
5
+ require 'pindo/base/executable'
6
+
7
+ module Pindo
8
+ class Command
9
+ class Unity < Command
10
+ class Ipa < Unity
11
+ # Unity IPA包编译和上传命令
12
+ self.summary = '编译Unity工程生成iOS IPA并支持上传到测试平台'
13
+
14
+ # 详细说明
15
+ self.description = <<-DESC
16
+ 编译Unity工程生成iOS IPA并支持上传到测试平台。
17
+
18
+ 支持功能:
19
+
20
+ * 编译生成IPA
21
+
22
+ * 上传到测试平台
23
+
24
+ * 发送测试通知
25
+
26
+ 使用示例:
27
+
28
+ $ pindo unity ipa # 编译IPA
29
+
30
+ $ pindo unity ipa --upload # 编译并上传
31
+
32
+ $ pindo unity ipa --send # 编译上传并发送通知
33
+
34
+ $ pindo unity ipa --proj=myapp # 指定项目名称
35
+ DESC
36
+
37
+ # 命令参数
38
+ self.arguments = [
39
+ # 暂无参数
40
+ ]
41
+
42
+ # 命令选项
43
+ def self.options
44
+ [
45
+ ['--proj', '指定上传到测试平台的项目名称'],
46
+ ['--upload', '上传编译后的IPA到测试平台'],
47
+ ['--send', '上传成功后发送测试通知']
48
+ ].concat(super)
49
+ end
50
+
51
+
52
+ def initialize(argv)
53
+
54
+ @args_proj_name = argv.option('proj')
55
+ @args_upload_flag = argv.flag?('upload', false)
56
+ @args_send_flag = argv.flag?('send', false)
57
+
58
+ if @args_send_flag
59
+ @args_upload_flag = true
60
+ end
61
+
62
+ super
63
+ end
64
+
65
+
66
+ def run
67
+
68
+ puts "ipa "
69
+
70
+ end
71
+
72
+
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,16 @@
1
+
2
+
3
+ require 'pindo/command/unity/ipa'
4
+ require 'pindo/command/unity/apk'
5
+
6
+
7
+ module Pindo
8
+ class Command
9
+
10
+ class Unity < Command
11
+ self.abstract_command = true
12
+ self.summary = 'Unity相关命令'
13
+ end
14
+
15
+ end
16
+ end
data/lib/pindo/command.rb CHANGED
@@ -47,7 +47,9 @@ module Pindo
47
47
  require 'pindo/command/upgrade'
48
48
  require 'pindo/command/ipa'
49
49
  require 'pindo/command/appstore'
50
-
50
+ require 'pindo/command/unity'
51
+ require 'pindo/command/ios'
52
+ require 'pindo/command/android'
51
53
 
52
54
  attr_accessor :args_help_flag
53
55
  alias_method :args_help_flag?, :args_help_flag
@@ -130,6 +130,10 @@ module Pindo
130
130
  puts
131
131
  puts "选择的bundle id是: #{menu_choice}"
132
132
  puts
133
+ if menu_choice.eql?("com.heroneverdie101.*")
134
+ menu_choice = "com.heroneverdie101"
135
+ end
136
+
133
137
  return menu_choice;
134
138
 
135
139
  end
@@ -160,7 +160,7 @@ module Pindo
160
160
  end
161
161
 
162
162
  if !provisioning_info.nil?
163
- config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"]
163
+ config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"] unless provisioning_info["bundle_id"].eql?("com.heroneverdie101.*")
164
164
  config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = provisioning_info['profile_name']
165
165
  config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]'] = provisioning_info['profile_name']
166
166
  end
@@ -184,7 +184,7 @@ module Pindo
184
184
  config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = "Apple Distribution"
185
185
  end
186
186
  if !provisioning_info.nil?
187
- config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"]
187
+ config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = provisioning_info["bundle_id"] unless provisioning_info["bundle_id"].eql?("com.heroneverdie101.*")
188
188
  config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = provisioning_info['profile_name']
189
189
  config.build_settings['PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]'] = provisioning_info['profile_name']
190
190
  end
@@ -168,6 +168,7 @@ module Pindo
168
168
  unless !ipa_file_upload.nil? && File.exist?(ipa_file_upload)
169
169
  return
170
170
  end
171
+
171
172
  args_ipa_file_dir = File.expand_path(File::dirname(ipa_file_upload))
172
173
  ipa_file_upload=File.join(args_ipa_file_dir, File.basename(ipa_file_upload))
173
174
  current_project_dir = Dir.pwd
@@ -215,7 +216,9 @@ module Pindo
215
216
  Dir.chdir current_project_dir
216
217
  end
217
218
 
218
-
219
+ if description.nil? || description.length <= 0
220
+ description = " "
221
+ end
219
222
  puts
220
223
  puts "上传项目: #{app_info_obj["appName"]}"
221
224
  print "上传备注: "
@@ -277,6 +280,20 @@ module Pindo
277
280
  wechat_msg_url
278
281
  end
279
282
 
283
+ def send_apptest_msg(appId:nil, appVersionId:nil, chatEnv: nil, receiveType:nil)
284
+
285
+ Funlog.instance.fancyinfo_start("正在发送飞书消息...")
286
+ result = @pgyer_client.post_message(appId:appId, appVersionId:appVersionId, chatEnv: chatEnv, receiveType:receiveType)
287
+
288
+ if !result.nil? && result["code"] == 200 && result["data"] == "success"
289
+ Funlog.instance.fancyinfo_success("测试信息已经发送飞书!")
290
+ return true
291
+ else
292
+ Funlog.instance.fancyinfo_error("未发送飞书测试信息!")
293
+ return false
294
+ end
295
+
296
+ end
280
297
 
281
298
  def send_apptest_wechat_msg(msg_data:nil, wechat_url:nil)
282
299
 
@@ -124,7 +124,7 @@ module Pindo
124
124
  config.build_settings['CODE_SIGN_IDENTITY'] = "iPhone Developer"
125
125
  config.build_settings['DEVELOPMENT_TEAM'] = "9WX2E4VC26"
126
126
  config.build_settings['PROVISIONING_PROFILE'] = ""
127
- config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundle_id
127
+ config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundle_id unless bundle_id.eql?("com.heroneverdie101.*")
128
128
  config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = "match Development " + bundle_id
129
129
  # config.build_settings['TARGETED_DEVICE_FAMILY'] = "1,2"
130
130
  if is_extention
@@ -61,6 +61,7 @@ module Pindo
61
61
  attr_accessor :config_json
62
62
  attr_accessor :additional_args
63
63
 
64
+
64
65
  def self.options
65
66
  [
66
67
  ['--u=', 'input apple id'],
@@ -200,6 +201,9 @@ module Pindo
200
201
 
201
202
  if @config_json['app_info'] && @config_json['app_info']['app_identifier']
202
203
  @deploy_identifier = @config_json['app_info']['app_identifier']
204
+ if @deploy_identifier.eql?("com.heroneverdie101")
205
+ @deploy_identifier = "com.heroneverdie101.*"
206
+ end
203
207
  end
204
208
 
205
209
  if @config_json['app_info'] && @config_json['app_info']['app_identifier_pushcontent']
data/lib/pindo/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Pindo
2
2
 
3
- VERSION = "4.8.7"
3
+ VERSION = "4.8.8"
4
4
 
5
5
  class VersionCheck
6
6
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pindo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.7
4
+ version: 4.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - wade
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
10
+ date: 2025-02-14 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: claide
@@ -242,6 +241,8 @@ files:
242
241
  - lib/pindo/client/pgyeruploadclient.rb
243
242
  - lib/pindo/client/tgateclient.rb
244
243
  - lib/pindo/command.rb
244
+ - lib/pindo/command/android.rb
245
+ - lib/pindo/command/android/debug.rb
245
246
  - lib/pindo/command/appstore.rb
246
247
  - lib/pindo/command/appstore/iap.rb
247
248
  - lib/pindo/command/appstore/itcapp.rb
@@ -288,6 +289,19 @@ files:
288
289
  - lib/pindo/command/env/quarkenv.rb
289
290
  - lib/pindo/command/env/swarkenv.rb
290
291
  - lib/pindo/command/env/workhard.rb
292
+ - lib/pindo/command/gplay.rb
293
+ - lib/pindo/command/gplay/iap.rb
294
+ - lib/pindo/command/gplay/itcapp.rb
295
+ - lib/pindo/command/gplay/metadata.rb
296
+ - lib/pindo/command/gplay/screenshots.rb
297
+ - lib/pindo/command/gplay/upload.rb
298
+ - lib/pindo/command/ios.rb
299
+ - lib/pindo/command/ios/adhoc.rb
300
+ - lib/pindo/command/ios/applovin.rb
301
+ - lib/pindo/command/ios/autoresign.rb
302
+ - lib/pindo/command/ios/build.rb
303
+ - lib/pindo/command/ios/cert.rb
304
+ - lib/pindo/command/ios/debug.rb
291
305
  - lib/pindo/command/ipa.rb
292
306
  - lib/pindo/command/ipa/autoresign.rb
293
307
  - lib/pindo/command/ipa/import.rb
@@ -310,6 +324,9 @@ files:
310
324
  - lib/pindo/command/repo/login.rb
311
325
  - lib/pindo/command/repo/search.rb
312
326
  - lib/pindo/command/setup.rb
327
+ - lib/pindo/command/unity.rb
328
+ - lib/pindo/command/unity/apk.rb
329
+ - lib/pindo/command/unity/ipa.rb
313
330
  - lib/pindo/command/upgrade.rb
314
331
  - lib/pindo/command/utils.rb
315
332
  - lib/pindo/command/utils/boss.rb
@@ -350,7 +367,6 @@ homepage: https://gitee.com/test/pindo.git
350
367
  licenses:
351
368
  - MIT
352
369
  metadata: {}
353
- post_install_message:
354
370
  rdoc_options: []
355
371
  require_paths:
356
372
  - lib
@@ -365,8 +381,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
365
381
  - !ruby/object:Gem::Version
366
382
  version: '0'
367
383
  requirements: []
368
- rubygems_version: 3.5.23
369
- signing_key:
384
+ rubygems_version: 3.6.2
370
385
  specification_version: 3
371
386
  summary: easy work
372
387
  test_files: []