pindo 5.10.4 → 5.10.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.
- checksums.yaml +4 -4
- data/lib/pindo/base/funlog.rb +12 -1
- data/lib/pindo/base/pindocontext.rb +3 -0
- data/lib/pindo/command/android/autobuild.rb +62 -9
- data/lib/pindo/command/android/build.rb +6 -6
- data/lib/pindo/command/android/debug.rb +9 -9
- data/lib/pindo/command/deploy/build.rb +5 -2
- data/lib/pindo/command/deploy/cert.rb +6 -7
- data/lib/pindo/command/deploy/configproj.rb +3 -3
- data/lib/pindo/command/deploy/confusecode.rb +1 -1
- data/lib/pindo/command/deploy/confuseproj.rb +1 -1
- data/lib/pindo/command/deploy/pem.rb +3 -4
- data/lib/pindo/command/dev/autobuild.rb +2 -2
- data/lib/pindo/command/dev/build.rb +2 -2
- data/lib/pindo/command/dev/feishu.rb +1 -1
- data/lib/pindo/command/gplay/pullconfig.rb +48 -0
- data/lib/pindo/command/gplay.rb +6 -5
- data/lib/pindo/command/ios/adhoc.rb +7 -6
- data/lib/pindo/command/ios/autobuild.rb +25 -25
- data/lib/pindo/command/ios/build.rb +7 -6
- data/lib/pindo/command/ios/debug.rb +2 -1
- data/lib/pindo/command/ipa/autoresign.rb +2 -2
- data/lib/pindo/command/ipa/import.rb +3 -4
- data/lib/pindo/command/ipa/output.rb +3 -4
- data/lib/pindo/command/jps/upload.rb +6 -5
- data/lib/pindo/command/repo/login.rb +1 -1
- data/lib/pindo/command/unity/apk.rb +19 -2
- data/lib/pindo/command/unity/autobuild.rb +58 -63
- data/lib/pindo/command/unity/initpack.rb +1 -1
- data/lib/pindo/command/unity/ipa.rb +17 -14
- data/lib/pindo/command/unity/pack.rb +1 -1
- data/lib/pindo/command/unity/upload.rb +1 -1
- data/lib/pindo/command/unity/web.rb +2 -2
- data/lib/pindo/command/utils/device.rb +4 -4
- data/lib/pindo/command/utils/icon.rb +1 -1
- data/lib/pindo/command/utils/renewcert.rb +2 -3
- data/lib/pindo/command/utils/renewproj.rb +9 -10
- data/lib/pindo/command/web/autobuild.rb +3 -3
- data/lib/pindo/command/web/run.rb +1 -1
- data/lib/pindo/command.rb +2 -1
- data/lib/pindo/module/android/android_build_config_helper.rb +267 -35
- data/lib/pindo/module/android/android_build_helper.rb +300 -0
- data/lib/pindo/module/android/android_project_helper.rb +279 -0
- data/lib/pindo/module/android/gp_compliance_helper.rb +33 -87
- data/lib/pindo/module/android/gradle_helper.rb +524 -255
- data/lib/pindo/module/android/java_env_helper.rb +633 -0
- data/lib/pindo/module/android/keystore_helper.rb +1118 -0
- data/lib/pindo/module/appselect.rb +109 -0
- data/lib/pindo/module/appstore/appstore_in_app_purchase.rb +1 -1
- data/lib/pindo/module/build/{buildhelper.rb → build_helper.rb} +1 -2
- data/lib/pindo/module/build/{commonconfuseproj.rb → confuse_xcodeproj.rb} +2 -2
- data/lib/pindo/module/cert/cert_helper.rb +245 -0
- data/lib/pindo/module/cert/keychain_helper.rb +152 -0
- data/lib/pindo/module/cert/pem_helper.rb +67 -0
- data/lib/pindo/module/cert/xcodecerthelper.rb +6 -5
- data/lib/pindo/module/pgyer/pgyerhelper.rb +5 -5
- data/lib/pindo/module/{build/unityhelper.rb → unity/unity_helper.rb} +0 -17
- data/lib/pindo/module/xcode/{xcodereshandler.rb → res/xcode_res_handler.rb} +1 -1
- data/lib/pindo/module/xcode/{xcodebuildconfig.rb → xcode_build_config.rb} +7 -6
- data/lib/pindo/module/xcode/{xcodebuildhelper.rb → xcode_build_helper.rb} +84 -2
- data/lib/pindo/module/xcode/{xcodehelper.rb → xcode_project_helper.rb} +4 -2
- data/lib/pindo/module/xcode/{xcodereshelper.rb → xcode_res_helper.rb} +12 -9
- data/lib/pindo/version.rb +185 -7
- data/lib/pindo.rb +14 -9
- metadata +24 -23
- data/lib/pindo/module/android/apk_helper.rb +0 -138
- data/lib/pindo/module/android/base_helper.rb +0 -964
- data/lib/pindo/module/android/build_helper.rb +0 -128
- data/lib/pindo/module/android/so_helper.rb +0 -18
- data/lib/pindo/module/cert/certhelper.rb +0 -246
- data/lib/pindo/module/cert/keychainhelper.rb +0 -150
- data/lib/pindo/module/cert/pemhelper.rb +0 -65
- /data/lib/pindo/module/android/{androidreshelper.rb → android_res_helper.rb} +0 -0
- /data/lib/pindo/module/appstore/{iap_tier.json → appstore_iap_tier.json} +0 -0
- /data/lib/pindo/module/build/{swarkhelper.rb → swark_helper.rb} +0 -0
- /data/lib/pindo/module/build/{versionhelper.rb → version_helper.rb} +0 -0
- /data/lib/pindo/module/cert/{provisioninghelper.rb → provisioning_helper.rb} +0 -0
- /data/lib/pindo/module/unity/{nugethelper.rb → nuget_helper.rb} +0 -0
- /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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c0935db120a0696b34c40a6f73b2c3610848940fee0395d86655041bf934864
|
|
4
|
+
data.tar.gz: 0337a78bdc208a9ba38c5e4a86d707d8e256f0a63a40a6274fd05fc35c40f270
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1065f8460b739d1d15843ea898f97c97f9e192180da44cc7bbb04a18c7d4f51c0e8491cdda16c3f849b7eda0fa775cba5913dace2396bdf5f366537f287d5dce
|
|
7
|
+
data.tar.gz: eb8b7d8eb79bf371dd3ebab16d25116d6c8bcc98ed6b6fe99c5782392dae360d546e8f6cbe0ff551acb4f3b8fa8ee2d45c72f9abb1e2aa128d8c873ee4e35bd2
|
data/lib/pindo/base/funlog.rb
CHANGED
|
@@ -56,13 +56,20 @@ module Pindo
|
|
|
56
56
|
puts " ✓ #{message}"
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
# 输出静态警告信息(不使用spinner
|
|
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/
|
|
5
|
-
require 'pindo/module/build/
|
|
6
|
-
require 'pindo/module/android/
|
|
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
|
-
|
|
130
|
+
workflow_packname = workflow_info[:package_name]
|
|
117
131
|
|
|
118
132
|
puts "\n使用工作流配置更新 Android 项目:"
|
|
119
|
-
puts " Package Name: #{
|
|
133
|
+
puts " Workflow Package Name: #{workflow_packname}"
|
|
120
134
|
|
|
121
135
|
# 一次性更新 App Name、Application ID 和 URL Schemes
|
|
122
|
-
Pindo::AndroidBuildConfigHelper.
|
|
136
|
+
Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
|
|
123
137
|
project_dir: pindo_project_dir,
|
|
124
|
-
|
|
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/
|
|
5
|
-
require 'pindo/module/android/
|
|
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
|
-
|
|
102
|
+
workflow_packname = workflow_info[:package_name]
|
|
103
103
|
|
|
104
104
|
puts "\n使用工作流配置更新 Android 项目:"
|
|
105
|
-
puts " Package Name: #{
|
|
105
|
+
puts " Workflow Package Name: #{workflow_packname}"
|
|
106
106
|
|
|
107
107
|
# 一次性更新 App Name、Application ID 和 URL Schemes
|
|
108
|
-
Pindo::AndroidBuildConfigHelper.
|
|
108
|
+
Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
|
|
109
109
|
project_dir: pindo_project_dir,
|
|
110
|
-
|
|
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
|
-
|
|
77
|
-
|
|
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
|
-
|
|
94
|
+
workflow_packname = workflow_info[:package_name]
|
|
95
95
|
|
|
96
96
|
puts "\n使用工作流配置更新 Android 项目:"
|
|
97
|
-
puts " Package Name: #{
|
|
97
|
+
puts " Workflow Package Name: #{workflow_packname}"
|
|
98
98
|
|
|
99
99
|
# 一次性更新 App Name、Application ID 和 URL Schemes
|
|
100
|
-
Pindo::AndroidBuildConfigHelper.
|
|
100
|
+
Pindo::AndroidBuildConfigHelper.update_project_with_workflow(
|
|
101
101
|
project_dir: pindo_project_dir,
|
|
102
|
-
|
|
102
|
+
workflow_packname: workflow_packname
|
|
103
103
|
)
|
|
104
104
|
else
|
|
105
105
|
raise Informative, "未获取到工作流信息"
|
|
@@ -3,13 +3,13 @@ require 'fileutils'
|
|
|
3
3
|
require 'json'
|
|
4
4
|
require 'xcodeproj'
|
|
5
5
|
require 'gym'
|
|
6
|
+
require 'pindo/module/xcode/xcode_build_helper'
|
|
6
7
|
|
|
7
8
|
module Pindo
|
|
8
9
|
class Command
|
|
9
10
|
class Deploy < Command
|
|
10
11
|
class Build < Deploy
|
|
11
12
|
|
|
12
|
-
|
|
13
13
|
self.summary = '编译工程'
|
|
14
14
|
|
|
15
15
|
self.description = <<-DESC
|
|
@@ -22,7 +22,7 @@ module Pindo
|
|
|
22
22
|
|
|
23
23
|
def self.options
|
|
24
24
|
[
|
|
25
|
-
['--proj', '指定上传到
|
|
25
|
+
['--proj', '指定上传到JPS对应的项目名称(大小写空格忽略),用法:pindo deploy build --proj=aichatv4'],
|
|
26
26
|
['--upload', '是否上传编译后的ipa(上传成功后会自动发送消息给自己), 用法:pindo deploy build --upload'],
|
|
27
27
|
['--send', '发送消息到项目群(注意:不带此参数也会发送给自己),用法:pindo deploy build --send'],
|
|
28
28
|
['--resign', '上传到之后是否重签名,用法:pindo deploy build --resign'],
|
|
@@ -72,6 +72,9 @@ module Pindo
|
|
|
72
72
|
new_project_dir = Dir.pwd
|
|
73
73
|
project_fullname = Dir.glob(File.join(new_project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
|
74
74
|
|
|
75
|
+
# 修复 Xcode 16 链接器兼容性问题
|
|
76
|
+
Pindo::XcodeBuildHelper.fix_xcode16_linker_flags(project_dir: new_project_dir)
|
|
77
|
+
|
|
75
78
|
if File.exist?(File.join(new_project_dir, "build"))
|
|
76
79
|
FileUtils.rm_rf(File.join(new_project_dir, "build"))
|
|
77
80
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'fileutils'
|
|
2
2
|
require 'match'
|
|
3
|
-
require 'pindo/module/build/
|
|
3
|
+
require 'pindo/module/build/swark_helper'
|
|
4
4
|
require 'pindo/module/cert/xcodecerthelper'
|
|
5
|
-
require 'pindo/module/cert/
|
|
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
|
|
|
@@ -52,8 +51,8 @@ module Pindo
|
|
|
52
51
|
['--macos', 'macos平台证书'],
|
|
53
52
|
['--clean', '删除本地缓存的证书'],
|
|
54
53
|
['--cleangit', '删除远程仓库中的证书'],
|
|
55
|
-
['--upload', '生成上传
|
|
56
|
-
['--match', '生成上传
|
|
54
|
+
['--upload', '生成上传JPS的证书'],
|
|
55
|
+
['--match', '生成上传JPS的证书'],
|
|
57
56
|
['--renew', '重新生成证书']
|
|
58
57
|
].concat(super)
|
|
59
58
|
end
|
|
@@ -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/
|
|
4
|
+
require 'pindo/module/xcode/xcode_build_helper'
|
|
5
5
|
require 'pindo/module/xcode/xcodeappconfig'
|
|
6
|
-
require 'pindo/module/
|
|
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
|
|
|
@@ -6,9 +6,8 @@ module Pindo
|
|
|
6
6
|
class Deploy < Command
|
|
7
7
|
class Pem < Deploy
|
|
8
8
|
|
|
9
|
-
require 'pindo/module/cert/
|
|
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/
|
|
6
|
+
require 'pindo/module/build/build_helper'
|
|
7
7
|
|
|
8
8
|
module Pindo
|
|
9
9
|
class Command
|
|
@@ -53,7 +53,7 @@ module Pindo
|
|
|
53
53
|
[
|
|
54
54
|
['--deploy', '默认用开发的bundle id,用法:pindo dev autobuild --deploy'],
|
|
55
55
|
['--adhoc', '默认用dev证书,使用--adhoc设置使用adhoc证书编译'],
|
|
56
|
-
['--proj', '指定上传到
|
|
56
|
+
['--proj', '指定上传到JPS对应的项目名称(大小写空格忽略)'],
|
|
57
57
|
['--upload', '是否上传编译后的ipa'],
|
|
58
58
|
['--send', '上传到之后是否发送测试信息'],
|
|
59
59
|
].concat(super)
|
|
@@ -3,7 +3,7 @@ require 'fileutils'
|
|
|
3
3
|
require 'json'
|
|
4
4
|
require 'xcodeproj'
|
|
5
5
|
require 'gym'
|
|
6
|
-
require 'pindo/module/build/
|
|
6
|
+
require 'pindo/module/build/build_helper'
|
|
7
7
|
|
|
8
8
|
module Pindo
|
|
9
9
|
class Command
|
|
@@ -42,7 +42,7 @@ module Pindo
|
|
|
42
42
|
|
|
43
43
|
def self.options
|
|
44
44
|
[
|
|
45
|
-
['--proj', '指定上传到
|
|
45
|
+
['--proj', '指定上传到JPS对应的项目名称(大小写空格忽略),用法:pindo dev build --proj=aichatv4'],
|
|
46
46
|
['--upload', '是否上传编译后的ipa, 用法:pindo dev build --upload'],
|
|
47
47
|
['--send', '上传到之后是否发送测试信息,用法:pindo dev build --send'],
|
|
48
48
|
].concat(super)
|
|
@@ -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
|
data/lib/pindo/command/gplay.rb
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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/
|
|
6
|
-
require 'pindo/command/gplay/
|
|
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
|
|
@@ -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
|
|
@@ -45,7 +46,7 @@ module Pindo
|
|
|
45
46
|
# 命令的选项列表
|
|
46
47
|
def self.options
|
|
47
48
|
[
|
|
48
|
-
#
|
|
49
|
+
# 指定上传到JPS的项目
|
|
49
50
|
['--proj', '指定上传到测试平台的项目名称'],
|
|
50
51
|
# 上传编译包
|
|
51
52
|
['--upload', '上传编译后的ipa到测试平台'],
|
|
@@ -92,15 +93,15 @@ module Pindo
|
|
|
92
93
|
|
|
93
94
|
# ===== 使用 workflow 配置更新项目 =====
|
|
94
95
|
if workflow_info && workflow_info[:package_name]
|
|
95
|
-
|
|
96
|
+
workflow_packname = workflow_info[:package_name]
|
|
96
97
|
|
|
97
98
|
puts "\n使用工作流配置更新 iOS 项目:"
|
|
98
|
-
puts " Package Name: #{
|
|
99
|
+
puts " Workflow Package Name: #{workflow_packname}"
|
|
99
100
|
|
|
100
101
|
# 一次性更新 Display Name、Bundle ID 和 URL Schemes
|
|
101
|
-
Pindo::XcodeBuildConfig.
|
|
102
|
+
Pindo::XcodeBuildConfig.update_project_with_workflow(
|
|
102
103
|
project_dir: project_dir,
|
|
103
|
-
|
|
104
|
+
workflow_packname: workflow_packname
|
|
104
105
|
)
|
|
105
106
|
else
|
|
106
107
|
raise Informative, "未获取到工作流信息"
|