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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09ee5f3903da98865392df97577a07edeb689c257ff99366254ae5a4372a32b8'
4
- data.tar.gz: ca00ddd8cca267b055156c7b201dc4a96358eb7b2e214ae65ccab3992e94f133
3
+ metadata.gz: 7fe1262bed9c25b306334ca2209ed82ab194d6ae2acffa2ce1fbb5909cb9fffc
4
+ data.tar.gz: e6a19a4bfa5c3ba0ce4e96d6589e059b125d661ce03780b3503b62c1de8bbf93
5
5
  SHA512:
6
- metadata.gz: c8e295e3c6c8d7f309ed6329268b8876fd8ee576fcb90af7b01e868a73776608d363b422b221c6b6ea094ebade9824718d4dac67ae8956cc99e9d7776dc570e4
7
- data.tar.gz: aa1d10dda525fb3d28c1e2f8fd27a36666d6111f22b6c411b55a9411dcc4efe4b60ff672787e8a1db44a7a74c6a4ca05e5d70c21bb4856a46ae26dded88bfbda
6
+ metadata.gz: da01ddfcb389cf6540e7d33ccc37d4fbd8ebbc3b56d3620a7aa79736fa681d6938f5a306a1e8371616e48ffde8faaabba455cc9ad2fc9f7cd32aea8e12bdb234
7
+ data.tar.gz: be71f22d99add9e089c327dd3db70cfd437432af40628b36d9de22b6e404ab0886e93613c0ea8a1424b0522f131099c1f113609f15e6ec21f8f63bdf3889f1fb
@@ -1,9 +1,7 @@
1
1
  module CocoapodsDongjia
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  UPDATE_DESC = <<-EOS
4
- - 修复本地 pod 添加属性出错
5
- - 添加 demo 指令
6
- - 更为高效的 repo 更新机制
7
- - 优化版本检测和路由抓取触发逻辑
4
+ - 修复 lpod 指令可能的出错
5
+ - 自动处理 appspecs 的签名
8
6
  EOS
9
7
  end
@@ -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
- pod_name = target.name.split('-').first
19
- if visibled_appspecs.include?(pod_name)
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.reject! { |key, value|
26
- [:git, :branch, :tag, :commit, :podspec].include?(key)
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.8
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
- - 修复本地 pod 添加属性出错
88
- - 添加 demo 指令
89
- - 更为高效的 repo 更新机制
90
- - 优化版本检测和路由抓取触发逻辑
87
+ - 修复 lpod 指令可能的出错
88
+ - 自动处理 appspecs 的签名
91
89
  post_install_message:
92
90
  rdoc_options: []
93
91
  require_paths: