cocoapods-tdfire-binary 1.3.9 → 1.3.10

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
  SHA1:
3
- metadata.gz: 634fd53981febf3d906dc8eac645e9fcb3aa587c
4
- data.tar.gz: 249b2eee8fede99bb2e13b4529e5bfdfde90c0ef
3
+ metadata.gz: 4804df6979892a35670db313dbc793f2a6ec59a4
4
+ data.tar.gz: ad1eea3a414dae65b80e304b1aee005b901946c6
5
5
  SHA512:
6
- metadata.gz: 64ad162b0a8c2a9133105879a3a8736af3da1cc9f527c58f26a4f66f89784df6b4fcda6c6cb166f9629e8b367013eb933edb57ab7c01d77574428dfec5cf7a4d
7
- data.tar.gz: f78da99150e3aa00ddda4355af716764acb9a554a8941e83f93df0184849383c3728b693cc6928e7ccffa3622d4698cf59d49508c626ba2e5fb9d6d6b8aff930
6
+ metadata.gz: 67703dd621d664580d71d2dad724f16f167431bd9c27f3bbfcd8ce0e23c8f278a3f61c33fde5d8d74866be990276a002cf68db608b9fc19ef39efac6b127ac4c
7
+ data.tar.gz: 351f7e2f5b6ac8d1e1ee4b05a7d1a9da9423e759a144f0620e71d1da7aac0488679ecadaa7dbbab0f7f6ed9014326b62417ce1fd105ff4d4b2b3f5598ef367f1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-tdfire-binary (1.3.7)
4
+ cocoapods-tdfire-binary (1.3.10)
5
5
  cocoapods (~> 1.2)
6
6
  cocoapods-packager (~> 1.5.0)
7
7
 
@@ -10,7 +10,6 @@ module Pod
10
10
  attr_reader :printed_pods
11
11
  attr_accessor :use_frameworks
12
12
  attr_accessor :use_source
13
- attr_accessor :lib_lint_binary_pod
14
13
  attr_accessor :limit_platform
15
14
  end
16
15
 
@@ -14,7 +14,7 @@ module Pod
14
14
  [
15
15
  ['--sources', '私有源地址'],
16
16
  ['--clean', '执行成功后,删除 zip 文件外的所有生成文件'],
17
- ['--one-binary', '只让 Lint 的 Pod 进行二进制依赖,其余都用源码'],
17
+ ['--binary-first', '二进制优先'],
18
18
  ['--subspec', 'lint 特定 subspec']
19
19
  ].concat(super)
20
20
  end
@@ -23,7 +23,7 @@ module Pod
23
23
  @clean = argv.flag?('clean')
24
24
  @sources = argv.option('sources')
25
25
  @subspec = argv.option('subspec')
26
- @one_binary = argv.flag?('one-binary')
26
+ @binary_first = argv.flag?('binary-first')
27
27
 
28
28
  @spec_file = first_podspec
29
29
  @spec_name = @spec_file.split('/').last.split('.').first unless @spec_file.nil?
@@ -47,10 +47,9 @@ module Pod
47
47
  end
48
48
 
49
49
  def run
50
- if @one_binary
51
- Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod = @spec_name
52
- else
53
- Pod::Tdfire::BinaryStateStore.set_force_use_binary
50
+ if @binary_first
51
+ Pod::Tdfire::BinaryStateStore.unpublished_pods = Pod::Tdfire::BinaryStateStore.unpublished_pods + Array(@spec_name)
52
+ Pod::Tdfire::BinaryStateStore.set_use_binary
54
53
  end
55
54
 
56
55
  argvs = [
@@ -66,12 +65,6 @@ module Pod
66
65
  lint.validate!
67
66
  lint.run
68
67
 
69
- if @one_binary
70
- Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod = nil
71
- else
72
- Pod::Tdfire::BinaryStateStore.unset_force_use_binary
73
- end
74
-
75
68
  system "rm -fr #{@spec_name}.framework " if @clean
76
69
  end
77
70
  end
@@ -2,6 +2,7 @@ require 'colored2'
2
2
  require 'fileutils'
3
3
  require 'cocoapods_packager'
4
4
  require 'cocoapods-tdfire-binary/binary_url_manager'
5
+ require 'cocoapods-tdfire-binary/binary_state_store'
5
6
  require 'cocoapods-tdfire-binary/binary_specification_refactor'
6
7
 
7
8
  module Pod
@@ -20,7 +21,8 @@ module Pod
20
21
  ['--spec-sources', '私有源地址'],
21
22
  # ['--local', '使用本地代码'],
22
23
  ['--use-carthage', 'carthage使用carthage进行打包,三方库提供carthage的优先'],
23
- ['--subspecs', '打包子组件']
24
+ ['--subspecs', '打包子组件'],
25
+ ['--binary-first', '二进制优先']
24
26
  ].concat(super)
25
27
  end
26
28
 
@@ -31,6 +33,7 @@ module Pod
31
33
  @spec_sources = argv.option('spec-sources')
32
34
  @subspecs= argv.option('subspecs')
33
35
  @spec_file = first_podspec
36
+ @binary_first = argv.flag?('binary-first')
34
37
  super
35
38
  end
36
39
 
@@ -54,6 +57,12 @@ module Pod
54
57
 
55
58
  spec = Specification.from_file(@spec_file)
56
59
  prepare(spec)
60
+
61
+ if @binary_first
62
+ Pod::Tdfire::BinaryStateStore.unpublished_pods = Pod::Tdfire::BinaryStateStore.unpublished_pods + Array(spec.name)
63
+ Pod::Tdfire::BinaryStateStore.set_use_binary
64
+ end
65
+
57
66
  package(spec)
58
67
  zip_packager_framework(spec)
59
68
 
@@ -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
@@ -14,7 +16,8 @@ module Pod
14
16
 
15
17
  def self.options
16
18
  [
17
- ['--commit="Fix some bugs"', '发布的 commit 信息']
19
+ ['--commit="Fix some bugs"', '发布的 commit 信息'],
20
+ ['--binary-first', '二进制优先']
18
21
  ].concat(super)
19
22
  end
20
23
 
@@ -24,6 +27,7 @@ module Pod
24
27
 
25
28
  spec_file = first_podspec if spec_file.nil?
26
29
  @spec_file = spec_file
30
+ @binary_first = argv.flag?('binary-first')
27
31
  super
28
32
  end
29
33
 
@@ -35,6 +39,11 @@ module Pod
35
39
  def run
36
40
  spec = Specification.from_file(@spec_file)
37
41
 
42
+ if @binary_first
43
+ Pod::Tdfire::BinaryStateStore.unpublished_pods = Pod::Tdfire::BinaryStateStore.unpublished_pods + Array(spec.name)
44
+ Pod::Tdfire::BinaryStateStore.set_use_binary
45
+ end
46
+
38
47
  UI.section("Tdfire: start publishing #{spec.name} ...") do
39
48
  argvs = [
40
49
  private_sources.first.name,
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTdfireBinary
2
- VERSION = "1.3.9"
2
+ VERSION = "1.3.10"
3
3
  end
@@ -76,12 +76,26 @@ module Pod
76
76
  end
77
77
 
78
78
  def tdfire_use_source?
79
- ((((!Pod::Tdfire::BinaryStateStore.force_use_binary? &&
80
- (!Pod::Tdfire::BinaryStateStore.use_binary? || Pod::Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name)) &&
81
- (!(Pod::Tdfire::BinaryStateStore.third_party_use_binary? && tdfire_third_party?) || Pod::Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name))) ||
82
- Pod::Tdfire::BinaryStateStore.force_use_source?) &&
83
- (Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod != root.name)) ||
84
- !tdfire_had_set_binary_strategy)
79
+ (
80
+ (
81
+ (
82
+ !Pod::Tdfire::BinaryStateStore.force_use_binary? &&
83
+ (
84
+ !Pod::Tdfire::BinaryStateStore.use_binary? ||
85
+ Pod::Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name)
86
+ ) &&
87
+ (
88
+ !(
89
+ Pod::Tdfire::BinaryStateStore.third_party_use_binary? &&
90
+ tdfire_third_party?
91
+ ) ||
92
+ Pod::Tdfire::BinaryStateStore.real_use_source_pods.include?(root.name)
93
+ )
94
+ ) ||
95
+ Pod::Tdfire::BinaryStateStore.force_use_source? # 强制源码
96
+ ) ||
97
+ !tdfire_had_set_binary_strategy # 没有配置二进制策略
98
+ )
85
99
  end
86
100
 
87
101
  private
@@ -108,8 +122,7 @@ module Pod
108
122
  end
109
123
 
110
124
  def tdfire_should_skip_download?
111
- (!Pod::Tdfire::BinaryStateStore.force_use_binary? && Pod::Tdfire::BinaryStateStore.unpublished_pods.include?(root.name)) ||
112
- (Pod::Tdfire::BinaryStateStore.lib_lint_binary_pod == root.name)
125
+ (!Pod::Tdfire::BinaryStateStore.force_use_binary? && Pod::Tdfire::BinaryStateStore.unpublished_pods.include?(root.name))
113
126
  end
114
127
  end
115
128
  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.3.9
4
+ version: 1.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler