cocoapods-dongjia 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-dongjia/gem_version.rb +3 -5
- data/lib/dongjia_scheme_manager.rb +33 -3
- data/lib/helper/pod.rb +7 -3
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fe1262bed9c25b306334ca2209ed82ab194d6ae2acffa2ce1fbb5909cb9fffc
|
4
|
+
data.tar.gz: e6a19a4bfa5c3ba0ce4e96d6589e059b125d661ce03780b3503b62c1de8bbf93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da01ddfcb389cf6540e7d33ccc37d4fbd8ebbc3b56d3620a7aa79736fa681d6938f5a306a1e8371616e48ffde8faaabba455cc9ad2fc9f7cd32aea8e12bdb234
|
7
|
+
data.tar.gz: be71f22d99add9e089c327dd3db70cfd437432af40628b36d9de22b6e404ab0886e93613c0ea8a1424b0522f131099c1f113609f15e6ec21f8f63bdf3889f1fb
|
@@ -4,10 +4,30 @@ module Dongjia
|
|
4
4
|
|
5
5
|
class SchemeManager
|
6
6
|
|
7
|
+
# 获取主工程的 development team
|
8
|
+
def self.development_team(ctx)
|
9
|
+
team = nil
|
10
|
+
project = ctx.umbrella_targets.first.user_project
|
11
|
+
return team unless project.is_a?(Xcodeproj::Project)
|
12
|
+
|
13
|
+
target = project.targets.find { |t|
|
14
|
+
!t.name.include?('企业版') && !t.name.end_with?('Extension')
|
15
|
+
}
|
16
|
+
return team unless target.is_a?(Xcodeproj::Project::PBXNativeTarget)
|
17
|
+
|
18
|
+
build_cfg = target.build_configurations.find { |c| c.name == 'Debug' }
|
19
|
+
return team unless build_cfg.is_a?(Xcodeproj::Project::XCBuildConfiguration)
|
20
|
+
|
21
|
+
team = build_cfg.build_settings['DEVELOPMENT_TEAM']
|
22
|
+
end
|
23
|
+
|
7
24
|
def self.setup(ctx, params)
|
8
25
|
visibled_appspecs = params[:visibled_appspecs]
|
9
|
-
return if !visibled_appspecs || visibled_appspecs.empty?
|
26
|
+
# return if !visibled_appspecs || visibled_appspecs.empty?
|
10
27
|
sandbox_root = ctx.sandbox_root
|
28
|
+
|
29
|
+
team = development_team(ctx)
|
30
|
+
|
11
31
|
Dir.foreach(sandbox_root).select{|f| f.end_with?('xcodeproj')}.each do |name|
|
12
32
|
proj = Xcodeproj::Project.open(File.join(sandbox_root, name))
|
13
33
|
proj.targets.each do | target |
|
@@ -15,11 +35,21 @@ module Dongjia
|
|
15
35
|
next unless target.name.include?('-')
|
16
36
|
# 确保是可执行程序
|
17
37
|
next unless target.product_type == 'com.apple.product-type.application'
|
18
|
-
|
19
|
-
|
38
|
+
|
39
|
+
# 设置签名信息
|
40
|
+
if team.is_a?(String)
|
41
|
+
target.build_configurations.first.build_settings['DEVELOPMENT_TEAM'] = team
|
42
|
+
target.build_configurations.each { |cfg|
|
43
|
+
cfg.build_settings['DEVELOPMENT_TEAM'] = team
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
if visibled_appspecs.include?(target.name.split('-').first)
|
48
|
+
# 将 visibled_appspecs 中指定的 target 设为可见状态
|
20
49
|
proj.set_target_scheme_visible(target, true)
|
21
50
|
end
|
22
51
|
end
|
52
|
+
proj.save if team.is_a?(String)
|
23
53
|
end
|
24
54
|
end
|
25
55
|
|
data/lib/helper/pod.rb
CHANGED
@@ -22,9 +22,13 @@ module Pod
|
|
22
22
|
end
|
23
23
|
if local_path
|
24
24
|
cfg = requirements.pop
|
25
|
-
cfg.
|
26
|
-
|
27
|
-
|
25
|
+
if cfg.is_a?(Hash)
|
26
|
+
cfg.reject! { |key, value|
|
27
|
+
[:git, :branch, :tag, :commit, :podspec].include?(key)
|
28
|
+
}
|
29
|
+
else
|
30
|
+
cfg = {:path => local_path}
|
31
|
+
end
|
28
32
|
cfg.merge!({:path => local_path})
|
29
33
|
requirements.push(cfg)
|
30
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-dongjia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiangzhuoyi
|
@@ -84,10 +84,8 @@ licenses:
|
|
84
84
|
- MIT
|
85
85
|
metadata:
|
86
86
|
update_desc: |2
|
87
|
-
-
|
88
|
-
-
|
89
|
-
- 更为高效的 repo 更新机制
|
90
|
-
- 优化版本检测和路由抓取触发逻辑
|
87
|
+
- 修复 lpod 指令可能的出错
|
88
|
+
- 自动处理 appspecs 的签名
|
91
89
|
post_install_message:
|
92
90
|
rdoc_options: []
|
93
91
|
require_paths:
|