pindo 5.0.7 → 5.0.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.
- checksums.yaml +4 -4
- data/lib/pindo/client/pgyer_feishu_oauth_cli.rb +0 -6
- data/lib/pindo/command/ios/autobuild.rb +16 -1
- data/lib/pindo/command/ios/debug.rb +21 -3
- data/lib/pindo/version.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08d012f8edb60e226490c213a446837bc36c852d531d5ac5de0a57b3ff5e525c'
|
4
|
+
data.tar.gz: 4d32c862affc436c18d9ff6cacdf00e332a868ca9fc07208d0c2ba29b1516ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8afdcda6e2f03492f285e44d140259b9c609470a5911eb8008c23788658bf076ee2eec5210afedf2b2e03faf717f3820132ccb883cc7d0b32b94ae9e0971f31c
|
7
|
+
data.tar.gz: 51a451ef991d341d6f4621cdd391ec9b4fd7267c1fa0bba045f35375252fccf8a6feb29474fa8fb49776762a5138026a8251ff3e6885e95bf67c839976ef013e
|
@@ -282,12 +282,6 @@ module Pindo
|
|
282
282
|
// 方法1: 最基本的关闭尝试
|
283
283
|
window.close();
|
284
284
|
|
285
|
-
// 方法2: 对于某些浏览器需要历史记录操作
|
286
|
-
window.history.back();
|
287
|
-
|
288
|
-
// 方法3: 空白页替换
|
289
|
-
window.location.href = "about:blank";
|
290
|
-
|
291
285
|
// 方法4: 尝试使用opener关系
|
292
286
|
if (window.opener) {
|
293
287
|
window.opener.focus();
|
@@ -11,6 +11,7 @@ module Pindo
|
|
11
11
|
class Autobuild < Ios
|
12
12
|
|
13
13
|
include Appselect
|
14
|
+
include Pindo::Githelper
|
14
15
|
# 命令的简要说明 - 打包iOS工程并发布到蒲公英
|
15
16
|
self.summary = '打包iOS工程并发布到蒲公英'
|
16
17
|
|
@@ -138,13 +139,27 @@ module Pindo
|
|
138
139
|
app_info_obj = PgyerHelper.share_instace.prepare_upload(working_directory:Dir.pwd, proj_name:proj_name)
|
139
140
|
end
|
140
141
|
|
142
|
+
|
141
143
|
args_temp = []
|
142
144
|
args_temp << mainapp_bundleid
|
143
145
|
Pindo::Command::Deploy::Pullconfig::run(args_temp)
|
144
146
|
|
145
147
|
Dir.chdir(pindo_project_dir)
|
146
148
|
config_json_file = File.join(pindo_project_dir,"config.json")
|
147
|
-
|
149
|
+
|
150
|
+
scheme_name = @args_proj_name if @args_proj_name
|
151
|
+
if !app_info_obj.nil? && !app_info_obj["appName"].nil? && !app_info_obj["appName"].empty?
|
152
|
+
scheme_name = app_info_obj["appName"]
|
153
|
+
end
|
154
|
+
if scheme_name.nil? || scheme_name.empty? && is_git_directory?(local_repo_dir:pindo_project_dir)
|
155
|
+
current_git_root_path = git_root_directory(local_repo_dir: pindo_project_dir)
|
156
|
+
git_repo_name = File.basename(current_git_root_path)
|
157
|
+
if !git_repo_name.nil? && !git_repo_name.empty?
|
158
|
+
scheme_name = git_repo_name
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
Pindo::Command::Ios::Debug::modify_cert_with_project(project_dir:pindo_project_dir, config_file:config_json_file, scheme_name:scheme_name)
|
148
163
|
|
149
164
|
if File.exist?(File.join(pindo_project_dir, "Podfile"))
|
150
165
|
|
@@ -6,7 +6,7 @@ module Pindo
|
|
6
6
|
class Debug < Ios
|
7
7
|
|
8
8
|
include Appselect
|
9
|
-
|
9
|
+
include Pindo::Githelper
|
10
10
|
include XcodeCertHelper
|
11
11
|
self.summary = '更新iOS证书并使用新证书设置Xcode工程'
|
12
12
|
self.description = <<-DESC
|
@@ -104,12 +104,13 @@ module Pindo
|
|
104
104
|
|
105
105
|
end
|
106
106
|
|
107
|
-
def self.modify_cert_with_project(project_dir:nil, config_file:nil)
|
107
|
+
def self.modify_cert_with_project(project_dir:nil, config_file:nil, scheme_name:nil)
|
108
108
|
|
109
109
|
project_fullname = Dir.glob(File.join(project_dir, "/*.xcodeproj")).max_by {|f| File.mtime(f)}
|
110
110
|
if !project_fullname.nil?
|
111
111
|
|
112
112
|
entitlements_plist_path = nil
|
113
|
+
info_plist_path = nil
|
113
114
|
project_obj = Xcodeproj::Project.open(project_fullname)
|
114
115
|
project_obj.targets.each do |target|
|
115
116
|
if target.product_type.to_s.eql?("com.apple.product-type.application") then
|
@@ -117,9 +118,26 @@ module Pindo
|
|
117
118
|
if !temp_entitlements_file.nil? && !temp_entitlements_file.empty?
|
118
119
|
entitlements_plist_path = File.join(project_dir, temp_entitlements_file)
|
119
120
|
end
|
121
|
+
temp_info_file = target.build_configurations.first.build_settings['INFOPLIST_FILE']
|
122
|
+
if !temp_info_file.nil? && !temp_info_file.empty?
|
123
|
+
info_plist_path = File.join(project_dir, temp_info_file)
|
124
|
+
end
|
120
125
|
end
|
121
126
|
end
|
122
|
-
|
127
|
+
|
128
|
+
if !info_plist_path.nil? && File.exist?(info_plist_path) && !scheme_name.nil? && !scheme_name.empty?
|
129
|
+
scheme_name = scheme_name.to_s.downcase.strip.gsub(/[\s\-_]/, '')
|
130
|
+
info_plist_dict = Xcodeproj::Plist.read_from_path(info_plist_path)
|
131
|
+
info_plist_dict["CFBundleURLTypes"] = []
|
132
|
+
item0 = {}
|
133
|
+
item0["CFBundleTypeRole"] = "Editor"
|
134
|
+
item0["CFBundleURLName"] = scheme_name
|
135
|
+
item0["CFBundleURLSchemes"] = []
|
136
|
+
item0["CFBundleURLSchemes"] << scheme_name
|
137
|
+
info_plist_dict["CFBundleURLTypes"] << item0
|
138
|
+
Xcodeproj::Plist.write_to_path(info_plist_dict, info_plist_path)
|
139
|
+
end
|
140
|
+
|
123
141
|
# puts entitlements_plist_path
|
124
142
|
if !entitlements_plist_path.nil? && File.exist?(entitlements_plist_path)
|
125
143
|
config_json = nil
|
data/lib/pindo/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pindo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wade
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-17 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: claide
|