cocoapods-tdf-bin 0.0.24 → 0.0.25

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: b12ad3159d7e92f44ffd550df9bf4d09646c07769d9feea345778edf575ccb8c
4
- data.tar.gz: cc4bee203d36048b9ca59b9e83f10cf5ba2e1bc77458ebd9a4399b046984bcfa
3
+ metadata.gz: 791a58d07bcd6abf68f6b1c8b03880555070ce1e8f3fc53beeb35305d6560b87
4
+ data.tar.gz: 9dbd4643830bffb28819d663b3f00d6587e39493e5382e45d73bfb7261780089
5
5
  SHA512:
6
- metadata.gz: 21663273f73583007da2afb7c44fdfbe7dd287b4e402f3ec9887b89affbe7b4646fc8674a3cabd302534e93678b2b6822e98d4ca50a6f952b2a98378bb481d3f
7
- data.tar.gz: 90212296c1ecde617fe82904aee89e295770f02467678a3fa8f2eb8076e22fc6b6da71c3268074c9178f1a2525f830a7cad8a4a4be1dd18bbf8119970357114e
6
+ metadata.gz: fc1e341b60778a600c7fd1232de3485df72af05eeac6daa00c3cca13df5efb2f584dcf8b589a0feac90af2058cbbf35226d00a097aa60f855ba4ca39a6930881
7
+ data.tar.gz: ed9feba4701f605e4b83b9d3b1c8f1360c604561e1cd740df55ddc80067e8540079e232e2822e892004c4570a141749e08477ee955eca8b5793dc3dd34b4dc05
@@ -55,7 +55,7 @@ module Pod
55
55
  local_pods = podfile_instance.get_batch_local_pods
56
56
  local_pods.each_key do |name|
57
57
  path = local_pods[name][0][:path]
58
- repo_url = find_repo_with_pod(name)
58
+ repo_url = Batch.find_repo_with_pod(name)
59
59
  puts "============== #{name} 开始 clone 到 #{path}==============".tdf_blue
60
60
  puts `git clone #{repo_url} #{path}`
61
61
  end
@@ -83,12 +83,10 @@ module Pod
83
83
  group_map = {}
84
84
  local_pods.each_key do |name|
85
85
  path = local_pods[name][0][:path]
86
- git_url = `git -C #{path} remote get-url --push origin`
87
86
  current_branch = `git -C #{path} branch --show-current`.delete!("\n")
88
- group_name = get_group_with_repo(git_url)
89
- puts "============== #{name} 当前分支 #{current_branch} 当前组 #{group_name} ==============".tdf_blue
87
+ puts "============== #{name} 当前分支 #{current_branch} ==============".tdf_blue
90
88
 
91
- group_key = "#{group_name}&&#{current_branch}"
89
+ group_key = "#{current_branch}"
92
90
  repo_arr = group_map[group_key]
93
91
  if repo_arr.is_a? Array
94
92
  repo_arr << name
@@ -106,9 +104,8 @@ module Pod
106
104
  pod_names.each do |name|
107
105
  pod_remote_str << " \"#{name}\",\n"
108
106
  end
109
- group = key.split("&&")[0]
110
- branch = key.split("&&")[1]
111
- pod_remote_str << " ], \"#{branch}\", \"#{group}\" \n\n"
107
+ branch = key
108
+ pod_remote_str << " ], \"#{branch}\" \n"
112
109
  end
113
110
  puts "将 local_batch 依赖 替换为 \n#{pod_remote_str}".tdf_blue
114
111
 
@@ -133,8 +130,8 @@ module Pod
133
130
  puts "替换成功".tdf_blue
134
131
  end
135
132
 
136
- def find_repo_with_pod(pod_name)
137
- sources = config.sources_manager.all
133
+ def self.find_repo_with_pod(pod_name)
134
+ sources = Config.instance.sources_manager.all
138
135
  sources = sources.select do |s|
139
136
  s.name == "2dfire-cocoapods-spec"
140
137
  end
@@ -151,18 +148,7 @@ module Pod
151
148
  git_url
152
149
  end
153
150
 
154
- def get_group_with_repo(repo_url)
155
- if repo_url.start_with?("http")
156
- re = Regexp.new("git.2dfire.net/.*/")
157
- repo_group = repo_url.match(re)[0][15..-2]
158
- else
159
- re = Regexp.new("git.2dfire.net:.*/")
160
- repo_group = repo_url.match(re)[0][15..-2]
161
- end
162
- repo_group
163
- end
164
-
165
- private :clone_all, :run_git, :find_repo_with_pod, :done_all, :get_group_with_repo
151
+ private :clone_all, :run_git, :done_all
166
152
 
167
153
  end
168
154
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
  module CBin
3
- VERSION = '0.0.24'
3
+ VERSION = '0.0.25'
4
4
  end
5
5
 
6
6
  module Pod
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'cocoapods'
4
4
  require 'cocoapods-tdf-bin/native/podfile_env'
5
+ require 'cocoapods-tdf-bin/command/bin/batch'
5
6
 
6
7
  module Pod
7
8
  class Podfile
@@ -24,10 +25,11 @@ module Pod
24
25
  end
25
26
  end
26
27
 
27
- def batch_pod_remote(pods, branch , group = 'ios')
28
+ def batch_pod_remote(pods, branch)
28
29
  pod_hash = Hash.new
29
30
  pods.each do |name|
30
- pod_hash[name] = [ :git => "git@git.2dfire.net:#{group}/#{name}.git", :branch => "#{branch}" ]
31
+ git_url = Pod::Command::Bin::Batch.find_repo_with_pod(name)
32
+ pod_hash[name] = [ :git => git_url, :branch => "#{branch}" ]
31
33
  end
32
34
  if get_batch_remote_pods.nil?
33
35
  set_internal_hash_value(BATCH_POD_REMOTE, pod_hash)
@@ -135,5 +137,6 @@ module Pod
135
137
  def get_internal_hash_value(key, default = nil)
136
138
  internal_hash.fetch(key, default)
137
139
  end
140
+
138
141
  end
139
142
  end
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.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - gaijiaofan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-30 00:00:00.000000000 Z
11
+ date: 2021-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel