cocoapods-bin 0.1.25 → 0.1.26

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
  SHA256:
3
- metadata.gz: f2f632f9b4f18ed2c88a9be2346807dcb22ae70c195d892859b06f85cc95aad2
4
- data.tar.gz: 24b2cb8937a8e27e9a39d07ce7c6ce5969324c65268e9317749d68bd9ed751b5
3
+ metadata.gz: 11741b2b6db7d044cdd5438f8b471d5ecb6870272a7bfdb9dc57afcf6aad0054
4
+ data.tar.gz: ec59a6c89439dc16304371e1d722286cb5771d386917c5b312f11ac87caa38c1
5
5
  SHA512:
6
- metadata.gz: 3f13ed9d68f96970587b44ac57a04bde83bc2c4c6a030d7b933f33d2c692be9deb7884725b20d40041dfd278df56fc0c8440d9592a0ff0fa5a043422c7c8da34
7
- data.tar.gz: 5391f2105a5527b9532036753e84ceea33d9c4789644cc649cc4245e21d3f1833f2881d9094230929825721cc4190e43c28b817a1ac21b8de3e2d864a2d4b8e4
6
+ metadata.gz: 6a5170672ced5aa6596365ce65c49c2b63c1ea45ffbaa73dd3bee22cb03bd7ce6b73cb5c86d630e354fbf9110bda3d78196da841f0a70ca15d0fb99a891990c8
7
+ data.tar.gz: 170a9b4ce6639f50b2fb4452f85eac3d64a2632fb59fc6d37f93bbfd9b90a0ddea4228ae6ee4826cbc7c043dee834ff49efe5fe10f8793182a1669dcef1d04cb
data/README.md CHANGED
@@ -6,6 +6,21 @@
6
6
 
7
7
  [Demo 工程](https://github.com/for-example-test/cocoapods-bin-example)
8
8
 
9
+ ## 更新
10
+
11
+ #### 0.1.26
12
+
13
+ 新增本地组件依赖配置文件 BinPodfile ,应对不想把本地采用的源码/二进制配置传到远程仓库的情况。如果存在此类需求,需要手动创建 BinPodfile ,并将其加入 .gitignore 。并且 BinPodfile 中的配置选项优先级比 Podfile 高,支持和 Podfile 相同的配置语句,如 :
14
+
15
+ ```ruby
16
+ # BinPodfile
17
+
18
+ use_binaries!
19
+ set_use_source_pods ['YYModel']
20
+
21
+ ```
22
+
23
+
9
24
  ## 概要
10
25
 
11
26
  本插件所关联的组件二进制化策略:
@@ -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.26'
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}"
@@ -4,6 +4,28 @@ 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
+ return 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
+ # rubocop:disable Lint/RescueException
19
+ begin
20
+ # rubocop:disable Eval
21
+ eval(contents, nil, path)
22
+ # rubocop:enable Eval
23
+ rescue Exception => e
24
+ message = "Invalid `#{path}` file: #{e.message}"
25
+ raise DSLError.new(message, path, e, contents)
26
+ end
27
+ # rubocop:disable Lint/RescueException
28
+ end
7
29
  end
8
30
 
9
31
  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.26
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-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.1.2
164
+ rubygems_version: 3.0.4
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: cocoapods-bin is a plugin which helps develpers switching pods between source