cocoapods-dep 1.0.0 → 1.0.1

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: 58323a243d5394a94f39b1e145f9b4dea68a9ec6f034980b2ed38bb856f154e7
4
- data.tar.gz: '0824dffad7eb6f3124a51359c8e6e8db6eaee1fb4df6612bee6f88f051f73920'
3
+ metadata.gz: '031483b702743bdc49820f34f8186e90ef5d18ce50ab94cb72fbc3940bc866e3'
4
+ data.tar.gz: 20285f3c947667462c044cde444fed8851a420991e5bd43a02919864bd080d54
5
5
  SHA512:
6
- metadata.gz: f678b9f7ad69f42418b5780a5a6751472a0eee9823673bd02dd8ed9ef2934f2e8dc3092a73cdf56feba736bebf406d50c2f74e4b952512f3e8dc548fef23ad78
7
- data.tar.gz: 78b20de6fa5cfcb31eef149d8bb8565727e3c1aa48a65e5c42301835c9784fbbf5d816fb24cc5124763c4efbf82c0b274143704b62b1b555fcd01106af478f29
6
+ metadata.gz: dd9d856ebb468c3b6cf9842424fda40765913ccf91a4f84eac2115227549fd4d716419abf91b2692400b943d0011793c5c325a5030304e98ce87c2aaf76d7083
7
+ data.tar.gz: d917f919cea5dfacbf58ed5128002927d46b97b3ba8c4c748bb532dbe401d83c1c7b8376e03be2741ffd879316d985527450d78a7d840730da2b68e1fb677678
@@ -97,7 +97,6 @@ module Pod
97
97
  platform = podspec.available_platforms.first
98
98
  platform_name, platform_version = platform.name, platform.deployment_target.to_s
99
99
  sources = SourcesManager.all.map(&:url)
100
- pp sources
101
100
  Podfile.new do
102
101
  install! :cocoapods, integrate_targets: false
103
102
  sources.each { |s| source s }
@@ -131,11 +130,14 @@ module Pod
131
130
  end
132
131
 
133
132
  def read_change_dependencies_from_file(path)
133
+ # 分析需要打tag的库
134
+ dependencies_need_tag
135
+
134
136
  yaml_file = YAML.load(File.open(path))
135
137
  lines = Array.new()
136
138
 
137
139
  change_dependencies = Array.new()
138
- CHANGE_DEPENDENCIES.each do |spec_name|
140
+ @change_dependencies.each do |spec_name|
139
141
  spec_dependency_hash = Hash.new()
140
142
  spec_name_key = spec_name
141
143
  spec_dependencies = Array.new()
@@ -155,7 +157,7 @@ module Pod
155
157
  dependencies_priority = Hash.new()
156
158
  change_dependencies.each do |dependency|
157
159
  dependency.each { |key, value|
158
- temp_arr = value & CHANGE_DEPENDENCIES
160
+ temp_arr = value & @change_dependencies
159
161
  if temp_arr.include? key
160
162
  temp_arr.delete(key)
161
163
  end
@@ -164,71 +166,44 @@ module Pod
164
166
  end
165
167
 
166
168
  temp_change_dependencies_priority = Hash.new()
167
- while temp_change_dependencies_priority != CHANGE_DEPENDENCIES_PRIORITY do
168
- temp_change_dependencies_priority = CHANGE_DEPENDENCIES_PRIORITY.clone
169
+ while temp_change_dependencies_priority != @change_dependencies_priority do
170
+ temp_change_dependencies_priority = @change_dependencies_priority.clone
169
171
  dependencies_priority.each { |key, value|
170
172
  if value.length > 0
171
- priority = CHANGE_DEPENDENCIES_PRIORITY[key]
173
+ priority = @change_dependencies_priority[key]
172
174
  value.each do |pod_name|
173
- if priority >= CHANGE_DEPENDENCIES_PRIORITY[pod_name]
174
- priority = CHANGE_DEPENDENCIES_PRIORITY[pod_name] - 1
175
+ if priority >= @change_dependencies_priority[pod_name]
176
+ priority = @change_dependencies_priority[pod_name] - 1
175
177
  end
176
178
  end
177
- CHANGE_DEPENDENCIES_PRIORITY[key] = priority
179
+ @change_dependencies_priority[key] = priority
178
180
  end
179
181
  }
180
182
  end
181
- pp CHANGE_DEPENDENCIES_PRIORITY
182
- write_to_disk(config.installation_root.to_s + '/' + OUTFILE, CHANGE_DEPENDENCIES_PRIORITY.to_yaml)
183
+ pp @change_dependencies_priority
184
+ write_to_disk(config.installation_root.to_s + '/' + OUTFILE, @change_dependencies_priority.to_yaml)
183
185
  end
184
186
 
185
- CHANGE_DEPENDENCIES = [
186
- "GCTTravel",
187
- "GCTUIKit",
188
- "GCTIOSUtils",
189
- "GCTAccount",
190
- "GCTQuickLogin",
191
- "GCTHTTPServer",
192
- "GCTWiFiConnection",
193
- "GCTStatistic",
194
- "GCTShareKit",
195
- "GCTMine",
196
- "GCTReservation",
197
- 'GCTCitiesAndStations',
198
- 'GCTMapKitV2',
199
- 'GCTSharedTravel',
200
- 'GCTPromotionCenter',
201
- 'GCTAudio',
202
- 'GCTCinema',
203
- 'GCTMediaPlayer',
204
- 'GCTVideo',
205
- 'GCTAdvert',
206
- 'GCTCoupon'
207
- ].map(&:freeze).freeze
208
-
209
- CHANGE_DEPENDENCIES_PRIORITY = {
210
- "GCTTravel"=> 1000,
211
- "GCTUIKit"=> 1000,
212
- "GCTIOSUtils"=> 1000,
213
- "GCTAccount"=> 1000,
214
- "GCTQuickLogin"=> 1000,
215
- "GCTHTTPServer"=> 1000,
216
- "GCTWiFiConnection"=> 1000,
217
- "GCTStatistic"=> 1000,
218
- "GCTShareKit"=> 1000,
219
- "GCTMine"=> 1000,
220
- "GCTReservation"=> 1000,
221
- 'GCTCitiesAndStations'=> 1000,
222
- 'GCTMapKitV2'=> 1000,
223
- 'GCTSharedTravel'=> 1000,
224
- 'GCTPromotionCenter'=> 1000,
225
- 'GCTAudio'=> 1000,
226
- 'GCTCinema'=> 1000,
227
- 'GCTMediaPlayer'=> 1000,
228
- 'GCTVideo'=> 1000,
229
- 'GCTAdvert'=> 1000,
230
- 'GCTCoupon'=> 1000
231
- }
187
+ def dependencies_need_tag
188
+ change_dependencies = Array.new()
189
+ IO.foreach("Podfile") { |line|
190
+ reg = /(?<=').*?(?=')/
191
+ # lstrip 去掉头部空格
192
+ if line.lstrip.start_with?("dev_pod")
193
+ pod_name = reg.match(line).to_s
194
+ if pod_name.include? '/'
195
+ pod_name = pod_name[0, pod_name.index('/')]
196
+ end
197
+ change_dependencies << pod_name
198
+ end
199
+ }
200
+ @change_dependencies = change_dependencies.uniq!
201
+ change_dependencies_priority = Hash.new()
202
+ change_dependencies.each do |pod_name|
203
+ change_dependencies_priority[pod_name] = 1000
204
+ end
205
+ @change_dependencies_priority = change_dependencies_priority
206
+ end
232
207
  end
233
208
  end
234
209
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsDep
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-dep
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler