cocoapods-tdfire-binary 1.4.29 → 1.4.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile.lock +1 -1
- data/lib/cocoapods-tdfire-binary/command/binary.rb +1 -0
- data/lib/cocoapods-tdfire-binary/command/version.rb +15 -0
- data/lib/cocoapods-tdfire-binary/command/version/match.rb +80 -0
- data/lib/cocoapods-tdfire-binary/gem_version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed6cba644d49bc3075b52fc27eeb11ea8899e7eb
|
4
|
+
data.tar.gz: 2169133498a0a2d8fde685290183f05b1f676682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3a47bf20aed890c09fe16463710029fa91d69a8aa4a9abe813cf21e019d73765ce1bf94a095acc4135b82aef31cecb9ac29644ed67902a6abdc61bece8bdc2b
|
7
|
+
data.tar.gz: b9e552c67efce0c4ea92e441ca15123898ba5c22942d48c9bba8eddb2a0f810d0d5ebaff710dd3aca1dc06b6b8ae804e79e7c3b9bad59cbc46765e9d3a9ab665
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,6 +9,7 @@ require 'cocoapods-tdfire-binary/command/delete'
|
|
9
9
|
require 'cocoapods-tdfire-binary/command/search'
|
10
10
|
require 'cocoapods-tdfire-binary/command/list'
|
11
11
|
require 'cocoapods-tdfire-binary/command/init'
|
12
|
+
require 'cocoapods-tdfire-binary/command/version'
|
12
13
|
require 'cocoapods-tdfire-binary/binary_config'
|
13
14
|
|
14
15
|
module Pod
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'cocoapods-tdfire-binary/command/version/match'
|
2
|
+
module Pod
|
3
|
+
class Command
|
4
|
+
class Binary < Command
|
5
|
+
class Version < Binary
|
6
|
+
self.abstract_command = true
|
7
|
+
self.default_subcommand = 'match'
|
8
|
+
self.summary = '组件版本操作'
|
9
|
+
self.description = <<-DESC
|
10
|
+
组件版本操作
|
11
|
+
DESC
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'cocoapods'
|
2
|
+
require 'cocoapods-tdfire-binary/command/version/match'
|
3
|
+
module Pod
|
4
|
+
class Command
|
5
|
+
class Binary < Command
|
6
|
+
class Version < Binary
|
7
|
+
class Match < Version
|
8
|
+
self.summary = '匹配私有源最新的版本.'
|
9
|
+
|
10
|
+
self.description = <<-DESC
|
11
|
+
会对当前Podfile中的组件和对应私有源中的组件的最新版本进行校对
|
12
|
+
DESC
|
13
|
+
|
14
|
+
attr_reader :source
|
15
|
+
|
16
|
+
def self.options
|
17
|
+
[
|
18
|
+
['--update-source', '更新私有源'],
|
19
|
+
].concat(super)
|
20
|
+
end
|
21
|
+
|
22
|
+
def initialize(argv)
|
23
|
+
@update_source = argv.flag?('update-source')
|
24
|
+
@source = private_sources.first
|
25
|
+
super
|
26
|
+
end
|
27
|
+
|
28
|
+
def validate!
|
29
|
+
super
|
30
|
+
verify_podfile_exists!
|
31
|
+
end
|
32
|
+
|
33
|
+
def print_untagged_pod
|
34
|
+
external_names = config.podfile.dependencies.select(&:external?).map(&:name)
|
35
|
+
if external_names.any?
|
36
|
+
puts "\n以下组件版本没有打tag:"
|
37
|
+
puts "============================================"
|
38
|
+
puts external_names.reduce("") { |result, pod|
|
39
|
+
versions = source.versions(pod)
|
40
|
+
version = versions.sort.last if versions
|
41
|
+
pod = pod + "\t(最新版本 #{version.to_s})" if version
|
42
|
+
result << pod + "\n"
|
43
|
+
}
|
44
|
+
puts "============================================"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def print_unmatched_newest_dependencies
|
49
|
+
tagged_dependencies = config.podfile.dependencies.reject(&:external?)
|
50
|
+
if tagged_dependencies.any?
|
51
|
+
unmatched_newest_dependencies = tagged_dependencies.reject do |dep|
|
52
|
+
versions = source.versions(dep.name) || source.versions(dep.name.split('/').first)
|
53
|
+
version = versions && versions.sort.last
|
54
|
+
dep.requirement === version if version
|
55
|
+
end
|
56
|
+
|
57
|
+
if unmatched_newest_dependencies.any?
|
58
|
+
puts "\n以下组件没有 match 最新版本:"
|
59
|
+
puts "============================================"
|
60
|
+
puts unmatched_newest_dependencies.reduce("") { |result, dep|
|
61
|
+
versions = source.versions(dep.name) || source.versions(dep.name.split('/').first)
|
62
|
+
version = versions.sort.last if versions
|
63
|
+
result << ("%-50s %s %-15s %s %s\n" % [dep.name, '=> 当前:', dep.requirement, '最新:', version])
|
64
|
+
}
|
65
|
+
puts "============================================"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def run
|
71
|
+
private_sources.each { |s| s.update(true) } if @update_source
|
72
|
+
|
73
|
+
print_untagged_pod
|
74
|
+
print_unmatched_newest_dependencies
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-tdfire-binary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tripleCC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,8 @@ files:
|
|
108
108
|
- lib/cocoapods-tdfire-binary/command/pull.rb
|
109
109
|
- lib/cocoapods-tdfire-binary/command/push.rb
|
110
110
|
- lib/cocoapods-tdfire-binary/command/search.rb
|
111
|
+
- lib/cocoapods-tdfire-binary/command/version.rb
|
112
|
+
- lib/cocoapods-tdfire-binary/command/version/match.rb
|
111
113
|
- lib/cocoapods-tdfire-binary/gem_version.rb
|
112
114
|
- lib/cocoapods-tdfire-binary/init_asker.rb
|
113
115
|
- lib/cocoapods-tdfire-binary/podfile_dsl.rb
|