cocoapods-tdf-bin 0.0.29 → 0.0.32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 965e339f8eea15bcc092ce5aec87779766eaf08b0ef2b149e656fb99f9b3ee3d
4
- data.tar.gz: 8a886b055ee958714e9375a299adc02e7dff365556991f34c62d79ff65033502
3
+ metadata.gz: 16d408732ce244aa6fa7590f6ff2737677dc5fc46a9f867aa91b034b7b70141a
4
+ data.tar.gz: e31eb5ad823627d63de950459b59b65e69bff363868ca5a7af962f891c6db4da
5
5
  SHA512:
6
- metadata.gz: 38eeb96491f2c9f4bcd6a0bf46c2fcf1027849e858795a1d8de29c23e8514f87cd8f9930a1e7739f5a7e54ddc96c29042929faa55c1d931d935c156d8ae4b999
7
- data.tar.gz: 627146df6541bc5cd4858f23350a9c329bca13cdb90c775038e521e21f98c90a1b975645bbea4fdc0623462bb823f1b717c1e2d7c15c9cdace44e89458843910
6
+ metadata.gz: c4d2f61a21673472392f44b043f4d47295197cfe224b1b95090903cae474439b7ec2c75fe3b8f7b3233e2b42ccfe7bb65cb141d0c3e20208edb572b8b90f35e4
7
+ data.tar.gz: 539e68c18b271e1a4ef853f597b9de5f68259f8dbe2d9dcb67248435d953278028a2c2c6411d360b26f7073c4ade8f845b1a15e33576843be6f0e089935f9ae9
@@ -9,6 +9,11 @@ module Pod
9
9
 
10
10
  self.summary = "批量操作本地依赖组件的 git 命令"
11
11
  self.description = <<-DESC
12
+ 批量导入的例子:
13
+ batch_pod [
14
+ "TDFHomeModule",
15
+ "TDFLogin",
16
+ ], "../../", :branch => "feature/smallNeeds", :isLocal => true
12
17
  用来批量操作通过 batch_pod_local 本地依赖的组件库,比如 pod bin batch pull, pod bin batch checkout master 等等;
13
18
  操作的是是通过 batch_pod_local 依赖的本地组件
14
19
  DESC
@@ -57,23 +62,33 @@ module Pod
57
62
  local_pods = podfile_instance.get_batch_local_pods
58
63
  local_pods.each_key do |name|
59
64
  path = local_pods[name][0][:path]
65
+ branch = local_pods[name][0][:branch]
60
66
  repo_url = Batch.find_repo_with_pod(name)
61
67
  puts "============== #{name} 开始 clone 到 #{path}==============".tdf_blue
62
68
  puts `git clone #{repo_url} #{path}`
69
+ res = `git -C #{path} checkout #{branch}`
70
+ puts res
71
+ if res != 0
72
+ `git -C #{path} checkout -b #{branch}`
73
+ end
63
74
  end
64
75
  end
65
76
 
66
77
  def run_git(podfile_instance)
78
+ arg = @arguments.map do |v|
79
+ match_str = /\s/.match(v)
80
+ if nil != match_str
81
+ v = "\"#{v}\""
82
+ end
83
+ v
84
+ end
85
+ arg = arg.join(" ")
86
+
87
+ puts "============== 主工程开始执行 git #{arg} 命令 ==============".tdf_blue
88
+ puts `git #{arg}`
89
+
67
90
  podfile_instance.get_batch_local_pods.each_value do |value|
68
91
  path = value[0][:path]
69
- arg = @arguments.map do |v|
70
- match_str = /\s/.match(v)
71
- if nil != match_str
72
- v = "\"#{v}\""
73
- end
74
- v
75
- end
76
- arg = arg.join(" ")
77
92
  puts "============== #{path} 开始执行 git #{arg} 命令 ==============".tdf_blue
78
93
  puts `git -C #{path} #{arg}`
79
94
  end
@@ -59,8 +59,6 @@ module Pod
59
59
  end
60
60
  end
61
61
 
62
- argvs << '--verbose'
63
-
64
62
  push = Pod::Command::Repo::Push.new(CLAide::ARGV.new(argvs))
65
63
  push.validate!
66
64
  push.run
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.0.29'
3
+ VERSION = "0.0.32"
4
4
  end
5
5
 
6
6
  module Pod
@@ -13,10 +13,26 @@ module Pod
13
13
  set_internal_hash_value(ALLOW_PRERELEASE, true)
14
14
  end
15
15
 
16
- def batch_pod_local(pods, path = "../../")
16
+ def batch_pod(pods, path = "../../", *requirements)
17
+ isLocal = requirements[0][:isLocal]
18
+ branch = requirements[0][:branch]
19
+ if isLocal.nil?
20
+ isLocal = false
21
+ end
22
+ if branch.nil?
23
+ branch = "master"
24
+ end
25
+ if isLocal
26
+ batch_pod_local(pods, path, branch)
27
+ else
28
+ batch_pod_remote(pods, branch)
29
+ end
30
+ end
31
+
32
+ def batch_pod_local(pods, path = "../../", branch = "master")
17
33
  pod_hash = Hash.new
18
34
  pods.each do |name|
19
- pod_hash[name] = [ :path => "#{path}#{name}" ]
35
+ pod_hash[name] = [ :path => "#{path}#{name}", :branch => branch ]
20
36
  end
21
37
  if get_batch_local_pods.nil?
22
38
  set_internal_hash_value(BATCH_POD_LOCAL, pod_hash)
@@ -120,12 +120,12 @@ module Pod
120
120
  use_source_pods = podfile.use_source_pods
121
121
 
122
122
  # 所有库的个数
123
- all_spec_count = 0
123
+ # all_spec_count = 0
124
124
 
125
125
  missing_binary_specs = []
126
126
  specs_by_target.each do |target, rspecs|
127
127
 
128
- all_spec_count = all_spec_count + rspecs.count
128
+ # all_spec_count = all_spec_count + rspecs.count
129
129
 
130
130
  # use_binaries 并且 use_source_pods 不包含 本地可过滤
131
131
  use_binary_rspecs = if podfile.use_binaries? || podfile.use_binaries_selector
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-tdf-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - gaijiaofan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-12 00:00:00.000000000 Z
11
+ date: 2022-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel