pindo 4.8.9 → 4.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d618bb3feb5391c7e4c64105f4f34e72fd542421da102a97e7436ed5d02261c
4
- data.tar.gz: 829babd10a742d61b622e248aa79429c6930f084dfcf90206540fe0fd9b64cf5
3
+ metadata.gz: 11b00add7874d6645d53ba3962c504569851df828c965cd31d6fa90ea495c1bd
4
+ data.tar.gz: 8222a4ed3d3e036fdcaaf3dd8b3f1af1c683881693c2054358d0edc7b5f64362
5
5
  SHA512:
6
- metadata.gz: f443d03a4934fc8ac2d31ec39bb3ad861a62c28bdd6542a434511cfe1d92f0cb8a6e35736809414e5b564fcec86b0d6393e65d70cec686cd64e518a334ac0277
7
- data.tar.gz: dd3b27fbcbc5b0392371d6e84feb14a9ece7241b940d7bfc162651d3eee3dd0a74998a5631bb5bb6d9c3115c222d4efff7de3f7df9cb24e85835ba101676ee46
6
+ metadata.gz: 869249634c7c48cf039749c1a36ff5ce2d9bd85c18d90165c168e755ab17001b695a334f909d6d85e67a688c813d6de05f968899f23c8051ac0b3ea04f4cfe24
7
+ data.tar.gz: c857e9ec891f54021610211ddfacd7009c2045baa5b91da03789a31452282c241e05f4e430915e5aa6d99fb8bb1a475188ec2825ec2bf2b45fcdef1268b41e75
@@ -48,7 +48,8 @@ module Pindo
48
48
  [
49
49
  ['--proj', '指定上传到测试平台的项目名称'],
50
50
  ['--upload', '上传编译后的IPA到测试平台'],
51
- ['--send', '上传成功后发送测试通知']
51
+ ['--send', '上传成功后发送测试通知'],
52
+ ['--base', 'Unity工程编译lib模式']
52
53
  ].concat(super)
53
54
  end
54
55
 
@@ -59,6 +60,7 @@ module Pindo
59
60
  @args_upload_flag = argv.flag?('upload', false)
60
61
  @args_send_flag = argv.flag?('send', false)
61
62
  @args_deploy_flag = argv.flag?('deploy', false)
63
+ @args_base_flag = argv.flag?('base', false)
62
64
 
63
65
  if @args_send_flag
64
66
  @args_upload_flag = true
@@ -67,15 +69,10 @@ module Pindo
67
69
  super
68
70
  end
69
71
 
70
- def export_ios_project(project_path)
72
+ def export_ios_project(project_path, pindo_ios_project_dir, additional_args)
71
73
  begin
72
74
  # 获取 UnityHelper 实例
73
75
  unity_helper = Pindo::Client::UnityHelper.share_instance
74
-
75
- # 准备额外的参数
76
- additional_args = {
77
- 'platform' => 'iOS'
78
- }
79
76
 
80
77
  # 执行Unity命令
81
78
  result = unity_helper.execute_unity_command(
@@ -87,7 +84,7 @@ module Pindo
87
84
  if result[:success]
88
85
  puts "Unity iOS library build completed successfully"
89
86
  puts "Unity version: #{result[:unity_version]}"
90
- puts "Output:"
87
+ puts "Output: #{pindo_ios_project_dir}"
91
88
  puts result[:stdout]
92
89
  return true
93
90
  else
@@ -123,14 +120,24 @@ module Pindo
123
120
  end
124
121
 
125
122
  pindo_unity_project_dir = Dir.pwd
126
- export_ios_project(pindo_unity_project_dir)
127
-
123
+ pindo_ios_project_dir = File.join(pindo_unity_project_dir, "Platform/iOS")
124
+ # 准备额外的参数
125
+ additional_args = {
126
+ 'platform' => 'iOS'
127
+ }
128
+ if @args_base_flag
129
+ pindo_ios_project_dir = File.join(pindo_unity_project_dir, "Platform/BaseiOS")
130
+ additional_args = {
131
+ 'platform' => 'iOS',
132
+ 'buildtype' => 'library'
133
+ }
134
+ end
128
135
 
129
- pindo_ios_project_dir = File.join(pindo_unity_project_dir, "Builds/iOS")
130
- args_temp = []
136
+ export_ios_project(pindo_unity_project_dir, pindo_ios_project_dir, additional_args)
131
137
 
138
+ args_temp = []
132
139
  args_temp << "--bundleid=#{mainapp_bundleid}"
133
-
140
+
134
141
  if @args_upload_flag
135
142
  args_temp << "--proj=#{app_info_obj["appName"]}"
136
143
  args_temp << "--upload"
@@ -138,7 +145,14 @@ module Pindo
138
145
  if @args_send_flag
139
146
  args_temp << "--send"
140
147
  end
148
+
141
149
  Dir.chdir(pindo_ios_project_dir)
150
+ if @args_base_flag
151
+ `chmod 777 #{pindo_ios_project_dir}`
152
+ else
153
+ `chmod 777 #{pindo_ios_project_dir}/Unity`
154
+ end
155
+
142
156
 
143
157
  Pindo::Command::Ios::Debug::run(args_temp)
144
158
 
@@ -172,18 +172,11 @@ module Pindo
172
172
  args_ipa_file_dir = File.expand_path(File::dirname(ipa_file_upload))
173
173
  ipa_file_upload=File.join(args_ipa_file_dir, File.basename(ipa_file_upload))
174
174
  current_project_dir = Dir.pwd
175
- puts "+++++1 current_project_dir = #{current_project_dir}"
176
175
 
177
176
  if description.nil? && is_git_directory?(local_repo_dir: current_project_dir)
178
- puts "+++++2 current_project_dir = #{current_project_dir}"
179
-
180
177
  current_git_root_path = git_root_directory(local_repo_dir: current_project_dir)
181
- puts "+++++3 current_git_root_path = #{current_git_root_path}"
182
-
183
178
  xcodeproj_file_name = Dir.glob(File.join(current_project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
184
179
  if !xcodeproj_file_name.nil? && !xcodeproj_file_name.empty? && File.exist?(xcodeproj_file_name)
185
- puts "+++++4 xcodeproj_file_name = #{xcodeproj_file_name}"
186
-
187
180
  project_obj = Xcodeproj::Project.open(xcodeproj_file_name)
188
181
  main_target = project_obj.targets.select { |target| target.product_type.include?(Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application]) }.first
189
182
  provisioning_profile_name = main_target.build_configurations.first.build_settings['PROVISIONING_PROFILE_SPECIFIER'].downcase.split(" ")
data/lib/pindo/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Pindo
2
2
 
3
- VERSION = "4.8.9"
3
+ VERSION = "4.9.0"
4
4
 
5
5
  class VersionCheck
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pindo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.9
4
+ version: 4.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wade