cocoapods-bin 0.1.25 → 0.1.30

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: f2f632f9b4f18ed2c88a9be2346807dcb22ae70c195d892859b06f85cc95aad2
4
- data.tar.gz: 24b2cb8937a8e27e9a39d07ce7c6ce5969324c65268e9317749d68bd9ed751b5
3
+ metadata.gz: 44ecc61e6e298bfa16b5d98bfbc7ac5d6a071e8334bca37fe1f7ade766356843
4
+ data.tar.gz: 8d4becffa40c380abbf869af59811d81e0d80b44ee0641da8ff40460e0d34362
5
5
  SHA512:
6
- metadata.gz: 3f13ed9d68f96970587b44ac57a04bde83bc2c4c6a030d7b933f33d2c692be9deb7884725b20d40041dfd278df56fc0c8440d9592a0ff0fa5a043422c7c8da34
7
- data.tar.gz: 5391f2105a5527b9532036753e84ceea33d9c4789644cc649cc4245e21d3f1833f2881d9094230929825721cc4190e43c28b817a1ac21b8de3e2d864a2d4b8e4
6
+ metadata.gz: 3477c312e417d8a2f7161d22813c73aa19cd923e08fd3ddfc2a18cb8eef8a446f950c150642715282845fe01a00c990dc11f78c6da75a73dfebf1538c84be8be
7
+ data.tar.gz: a48cc361ce45617a2522fb39110cfd3fb0c7f2675850fc2e0bf89c2f4f19a5f0dcd2e57f8af4b30a3f6680e09626db0ea18fa83adcaae541f4a39ffca4229e1f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-bin (0.1.25)
4
+ cocoapods-bin (0.1.30)
5
5
  cocoapods (~> 1.4)
6
6
  cocoapods-generate (~> 1.4)
7
7
  parallel
@@ -72,7 +72,7 @@ GEM
72
72
  nanaimo (0.2.6)
73
73
  nap (1.1.0)
74
74
  netrc (0.11.0)
75
- parallel (1.19.1)
75
+ parallel (1.19.2)
76
76
  prettybacon (0.0.2)
77
77
  bacon (~> 1.2)
78
78
  rake (13.0.0)
data/README.md CHANGED
@@ -6,6 +6,25 @@
6
6
 
7
7
  [Demo 工程](https://github.com/for-example-test/cocoapods-bin-example)
8
8
 
9
+ ## 更新
10
+
11
+ #### 0.1.28
12
+
13
+ 新增本地组件依赖配置文件 BinPodfile ,
14
+
15
+ 场景: 不希望把本地采用的源码/二进制配置传到远程仓库。
16
+
17
+ 使用: 在 Podfile 同级目录下创建 BinPodfile ,并将其加入 .gitignore 。BinPodfile 中的配置选项优先级比 Podfile 高,支持和 Podfile 相同的配置语句,如 :
18
+
19
+ ```ruby
20
+ # BinPodfile
21
+
22
+ use_binaries!
23
+ set_use_source_pods ['YYModel']
24
+
25
+ ```
26
+
27
+
9
28
  ## 概要
10
29
 
11
30
  本插件所关联的组件二进制化策略:
@@ -35,6 +35,7 @@ module Pod
35
35
  @zip = argv.flag?('zip', true)
36
36
  @sources = argv.option('sources') || []
37
37
  @platform = Platform.new(:ios)
38
+ @podspec = argv.shift_argument
38
39
  super
39
40
 
40
41
  @additional_args = argv.remainder!
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CBin
4
- VERSION = '0.1.25'
4
+ VERSION = '0.1.30'
5
5
  end
6
6
 
7
7
  module Pod
@@ -3,6 +3,7 @@
3
3
  # copy from https://github.com/CocoaPods/cocoapods-packager
4
4
 
5
5
  require 'cocoapods-bin/helpers/framework.rb'
6
+ require 'English'
6
7
 
7
8
  module CBin
8
9
  class Framework
@@ -176,7 +177,7 @@ module CBin
176
177
  command = "xcodebuild #{defines} #{args} CONFIGURATION_BUILD_DIR=#{build_dir} clean build -configuration Release -target #{target_name} -project ./Pods.xcodeproj 2>&1"
177
178
  output = `#{command}`.lines.to_a
178
179
 
179
- if $?.exitstatus != 0
180
+ if $CHILD_STATUS.exitstatus != 0
180
181
  raise <<~EOF
181
182
  Build command failed: #{command}
182
183
  Output:
@@ -72,13 +72,13 @@ module Pod
72
72
  has_changed_repo = !previous_spec_repo.nil? && current_repo && (current_repo != previous_spec_repo)
73
73
  title = "Installing #{spec.name} #{spec.version}"
74
74
  if has_changed_version && has_changed_repo
75
- title << " (was #{previous_version} and source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
75
+ title += " (was #{previous_version} and source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
76
76
  end
77
77
  if has_changed_version && !has_changed_repo
78
- title << " (was #{previous_version})"
78
+ title += " (was #{previous_version})"
79
79
  end
80
80
  if !has_changed_version && has_changed_repo
81
- title << " (source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
81
+ title += " (source changed to `#{current_repo}` from `#{previous_spec_repo}`)"
82
82
  end
83
83
  else
84
84
  title = "Installing #{spec}"
@@ -31,8 +31,7 @@ module Pod
31
31
 
32
32
  if Pod.match_version?('~> 1.4')
33
33
  def specifications_for_dependency(dependency, additional_requirements_frozen = [])
34
- additional_requirements = additional_requirements_frozen.dup
35
- additional_requirements.compact!
34
+ additional_requirements = additional_requirements_frozen.dup.compact
36
35
  requirement = Requirement.new(dependency.requirement.as_list + additional_requirements.flat_map(&:as_list))
37
36
  if podfile.allow_prerelease? && !requirement.prerelease?
38
37
  requirement = Requirement.new(dependency.requirement.as_list.map { |r| r + '.a' } + additional_requirements.flat_map(&:as_list))
@@ -50,6 +49,7 @@ module Pod
50
49
  else
51
50
  specifications = find_cached_set(dependency)
52
51
  .all_specifications(options.warn_for_multiple_pod_sources)
52
+ .select { |s| requirement.satisfied_by? s.version }
53
53
  end
54
54
 
55
55
  specifications
@@ -4,6 +4,24 @@ require 'cocoapods-bin/native/sources_manager'
4
4
 
5
5
  Pod::HooksManager.register('cocoapods-bin', :pre_install) do |_context, _|
6
6
  require 'cocoapods-bin/native'
7
+
8
+ # 同步 BinPodfile 文件
9
+ project_root = Pod::Config.instance.project_root
10
+ path = File.join(project_root.to_s, 'BinPodfile')
11
+
12
+ next unless File.exist?(path)
13
+
14
+ contents = File.open(path, 'r:utf-8', &:read)
15
+
16
+ podfile = Pod::Config.instance.podfile
17
+ podfile.instance_eval do
18
+ begin
19
+ eval(contents, nil, path)
20
+ rescue Exception => e
21
+ message = "Invalid `#{path}` file: #{e.message}"
22
+ raise Pod::DSLError.new(message, path, e, contents)
23
+ end
24
+ end
7
25
  end
8
26
 
9
27
  Pod::HooksManager.register('cocoapods-bin', :source_provider) do |context, _|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel