cocoapods-tdfire-binary 1.0.2 → 1.0.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/cocoapods-tdfire-binary.gemspec +1 -1
- data/lib/cocoapods-tdfire-binary/binary_state_store.rb +1 -0
- data/lib/cocoapods-tdfire-binary/command/lint.rb +49 -3
- data/lib/cocoapods-tdfire-binary/command/package.rb +1 -1
- data/lib/cocoapods-tdfire-binary/gem_version.rb +1 -1
- data/lib/cocoapods-tdfire-binary/specification_dsl.rb +11 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8328e8ae8eaa871044cbb0532223f282d1f882f
|
4
|
+
data.tar.gz: d6378235a93ebb956a8ed486fd0f089aac2d1297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb56e5c7c6176d9c4754c10318459a17ab27ea688c6c22a63fe03ce48838f4f849f1efab2bf35ec12f60c34a40ddd037066f2e77016466eae16110f6974ce108
|
7
|
+
data.tar.gz: df1a74d5402762726901609e32b1e8c5cbe0d4ad962a363e3f37ebad79cc2fc354d0f05ffaa19848cfac30ff66d588780c5c6402919633fcf441f06e4dcde6f1
|
data/Gemfile.lock
CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
22
|
spec.add_development_dependency 'rake', '~> 12.0'
|
23
23
|
|
24
|
-
spec.add_dependency 'cocoapods', '~> 1.
|
24
|
+
spec.add_dependency 'cocoapods', '~> 1.4'
|
25
25
|
spec.add_dependency 'cocoapods-packager', '~> 1.5.0'
|
26
26
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'cocoapods-tdfire-binary/binary_state_store'
|
2
|
+
|
1
3
|
module Pod
|
2
4
|
class Command
|
3
5
|
class Binary < Command
|
@@ -8,9 +10,53 @@ module Pod
|
|
8
10
|
对本地二进制进行 Lint
|
9
11
|
DESC
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
def self.options
|
14
|
+
[
|
15
|
+
['--sources', '私有源地址'],
|
16
|
+
['--clean', '执行成功后,删除 zip 文件外的所有生成文件'],
|
17
|
+
].concat(super)
|
18
|
+
end
|
19
|
+
|
20
|
+
def initialize(argv)
|
21
|
+
@clean = argv.flag?('clean')
|
22
|
+
@sources = argv.option('sources')
|
23
|
+
@spec_file = first_podspec
|
24
|
+
@spec_name = @spec_file.split('/').last.split('.').first
|
25
|
+
unzip_framework
|
26
|
+
super
|
27
|
+
end
|
28
|
+
|
29
|
+
def validate!
|
30
|
+
super
|
31
|
+
help! '当前目录下没有podspec文件.' if @spec_file.nil?
|
32
|
+
framework = "#{@spec_name}.framework"
|
33
|
+
help! "当前目录下没有#{framework}文件" unless File.exist?(framework)
|
34
|
+
end
|
35
|
+
|
36
|
+
def unzip_framework
|
37
|
+
framework = "#{@spec_name}.framework"
|
38
|
+
zip_name = "#{framework}.zip"
|
39
|
+
if File.exist?(zip_name) && !File.exist?("#{@spec_name}.framework")
|
40
|
+
system "unzip #{zip_name}"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def run
|
45
|
+
Tdfire::BinaryStateStore.lib_lint_binary_pod = @spec_name
|
46
|
+
|
47
|
+
argvs = [
|
48
|
+
"--sources=#{@sources || Tdfire::BinaryUrlManager.private_cocoapods_url}",
|
49
|
+
'--allow-warnings',
|
50
|
+
'--use-libraries',
|
51
|
+
'--verbose'
|
52
|
+
]
|
53
|
+
|
54
|
+
lint= Pod::Command::Lib::Lint.new(CLAide::ARGV.new(argvs))
|
55
|
+
lint.validate!
|
56
|
+
lint.run
|
57
|
+
|
58
|
+
system "rm -fr #{@spec_name}.framework " if @clean
|
59
|
+
end
|
14
60
|
end
|
15
61
|
end
|
16
62
|
end
|
@@ -58,12 +58,13 @@ module Pod
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
|
61
62
|
# 配置二进制文件下载、cache 住解压好的 framework
|
62
63
|
def tdfire_set_binary_download_configurations
|
63
64
|
tdfire_refactor.set_preserve_paths_with_reference_spec(tdfire_reference_spec)
|
64
65
|
|
65
66
|
# 没有发布的pod,没有二进制版本,不进行下载配置
|
66
|
-
return if
|
67
|
+
return if tdfire_should_skip_download?
|
67
68
|
|
68
69
|
raise Pod::Informative, "You must invoke the method after setting name and version" if root.name.nil? || version.nil?
|
69
70
|
|
@@ -78,9 +79,15 @@ module Pod
|
|
78
79
|
end
|
79
80
|
|
80
81
|
def tdfire_use_source?
|
81
|
-
(!Tdfire::BinaryStateStore.force_use_binary? &&
|
82
|
-
|
83
|
-
|
82
|
+
((!Tdfire::BinaryStateStore.force_use_binary? &&
|
83
|
+
(!Tdfire::BinaryStateStore.use_binary? || Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name))) ||
|
84
|
+
Tdfire::BinaryStateStore.force_use_source?) &&
|
85
|
+
(Tdfire::BinaryStateStore.lib_lint_binary_pod != root.name)
|
86
|
+
end
|
87
|
+
|
88
|
+
def tdfire_should_skip_download?
|
89
|
+
(!Tdfire::BinaryStateStore.force_use_binary? && Tdfire::BinaryStateStore.unpublished_pods.include?(root.name)) ||
|
90
|
+
(Tdfire::BinaryStateStore.lib_lint_binary_pod == root.name)
|
84
91
|
end
|
85
92
|
end
|
86
93
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-tdfire-binary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tripleCC
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.4'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: cocoapods-packager
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|