cocoapods-modularization 0.2.6 → 0.2.7

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: f7839de2985e7d19de49f4c5664189c59ccc72ee8f783fa6fb7a77928caf9cd9
4
- data.tar.gz: 693e7d44750f8f1872f8fb1f6476df09cabdf1daf98f0df7537ff494e8b82bd1
3
+ metadata.gz: 04016eb2b87c8f37843143c23e6aae3804b6edd0af79c03f84e5a55f0e590c11
4
+ data.tar.gz: c3f2c5c49472489c333335fa3f9872391f03502021bc5e2adecdebf514af9f7b
5
5
  SHA512:
6
- metadata.gz: 63dc94ba88df03193e1e3298e7508cc6edab857f034ea889826263f2a61b0a8c6b2cfd567ebf0af4f0ce5c374d6c39881990a79e6169f9a005398156b0b9cce1
7
- data.tar.gz: 07cf8a7a26dd4fc1921069fef617c227d2c9568a67cb99cfb541c4fc31176f814367d6c42e96277402aff097776f197a017470607951dcae77c7a42c6a0a9364
6
+ metadata.gz: a9c988d7504cf0777cd1f442960648bee12e0071e252e9213926aafcfbb73a6641728651f9a3855194a7778b09bc2d4045a1027421f4006ca6ae3bf0cefd7756
7
+ data.tar.gz: 4071d5174842ade39a5005e0a8562f9883e37bb280b00882474e689f8aa594a615a1b452242d8a67d9284bd42c3fd73c20f29d3c5bf206e8f77fb272f0663d6d
@@ -13,12 +13,14 @@ module Pod
13
13
 
14
14
  def self.options
15
15
  [
16
- ['--binary-only', 'Use this option impact this repo is a binary only repo']
16
+ ['--binary-only', '把framework推送到source和binary,一般用于三方库本地化'],
17
+ ['--framework-only', '把Binary/*framework推送到source和binary,一般用于私有库']
17
18
  ].concat(super)
18
19
  end
19
20
 
20
21
  def initialize(argv)
21
22
  @binary = argv.flag?('binary-only')
23
+ @framework = argv.flag?('framework-only')
22
24
  super
23
25
  end
24
26
 
@@ -40,7 +42,9 @@ module Pod
40
42
  end
41
43
 
42
44
  if @binary
43
- FileUtils.mv("#{Dir.pwd}/.build/Binary/build.rb", "#{Dir.pwd}/build.rb")
45
+ FileUtils.mv("#{Dir.pwd}/.build/Binary/binary_only.rb", "#{Dir.pwd}/build.rb")
46
+ elsif @framework
47
+ FileUtils.mv("#{Dir.pwd}/.build/Binary/framework_only.rb", "#{Dir.pwd}/build.rb")
44
48
  else
45
49
  FileUtils.mv("#{Dir.pwd}/.build/build.rb", "#{Dir.pwd}/build.rb")
46
50
  end
@@ -1,3 +1,3 @@
1
1
  module CocoapodsModularization
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -103,7 +103,7 @@ module Pod
103
103
  current_pwd = Dir.pwd
104
104
 
105
105
  # 1.检查repo_name合法性, 是否在repos中存在
106
- repos_path = locate_repos_path
106
+ repos_path = locate_repos_path(repo_name)
107
107
  raise "#{repo_name} not found in configured source, run 'pod mod config' or 'pod repo uppdate' at first" unless repos_path
108
108
 
109
109
  # 2.读取@@path_map缓存,是否有repo_name对应的pod的path存在
@@ -207,13 +207,13 @@ module Pod
207
207
  end
208
208
 
209
209
  ## 查询repos的路径
210
- def locate_repos_path
210
+ def locate_repos_path(repo_name)
211
211
  repos_path = Pathname.new(File.expand_path('~')) + '.cocoapods/repos'
212
212
 
213
213
  path = Dir.glob("#{repos_path}/*").select { |f| File.directory? f }.detect do |p|
214
214
  ssh = `/usr/bin/env -u GIT_CONFIG git -C #{p} config --get remote.origin.url`.lines.to_a.first.to_s
215
215
  ssh = ssh.strip if ssh.kind_of?(String)
216
- ssh.kind_of?(String) and [source_repo_url, binary_repo_url].include?(ssh)
216
+ ssh.kind_of?(String) and [source_repo_url(repo_name), binary_repo_url(repo_name)].include?(ssh)
217
217
  end
218
218
  end
219
219
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-modularization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - lazy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-19 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler