cocoapods-modularization 0.2.6 → 0.2.8

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: f7839de2985e7d19de49f4c5664189c59ccc72ee8f783fa6fb7a77928caf9cd9
4
- data.tar.gz: 693e7d44750f8f1872f8fb1f6476df09cabdf1daf98f0df7537ff494e8b82bd1
3
+ metadata.gz: a3a12f097e7b31fe8e67d928e874b47ccabba091ee0eb8deb5b57623510074f0
4
+ data.tar.gz: a0712ffad6e90f6d741a4b32debbbe19eedc6500c0a85ea21169e8b310fe6a89
5
5
  SHA512:
6
- metadata.gz: 63dc94ba88df03193e1e3298e7508cc6edab857f034ea889826263f2a61b0a8c6b2cfd567ebf0af4f0ce5c374d6c39881990a79e6169f9a005398156b0b9cce1
7
- data.tar.gz: 07cf8a7a26dd4fc1921069fef617c227d2c9568a67cb99cfb541c4fc31176f814367d6c42e96277402aff097776f197a017470607951dcae77c7a42c6a0a9364
6
+ metadata.gz: 410f0076ede68f37d65afa8dd42488fbd5ebeb2c320853f5fffdf745a3430706bc026a838f5a32ea185cf9b41587b42e005094153cc4966598c5f6a43683d9d3
7
+ data.tar.gz: 0bb7c87a0eba0a5431cdf7aae9983c24d2ddc8bee4d73a244cefac49ab72dbc0c64bcb8715ba00566f5caf851c06a0ea35f3c494a7e8ab1314f126ac6f85728a
@@ -47,7 +47,7 @@ module Pod
47
47
  FileUtils.rm_rf("#{Private::PrivateCache.root_path}/Repo")
48
48
  end
49
49
 
50
- system_build("/usr/bin/git clone #{repo_url} #{Private::PrivateCache.root_path}/Repo -b master --single-branch --depth 1")
50
+ system_build("/usr/bin/git clone #{repo_url} #{Private::PrivateCache.root_path}/Repo -b main --single-branch --depth 1")
51
51
 
52
52
  # 遍历文件夹
53
53
  max_version = Dir.glob("#{Private::PrivateCache.root_path}/Repo/#{@name}/*").map { |e| Gem::Version.new(e.match(/\d{1,2}\.\d{1,2}\.\d{1,2}/).to_s) }.max.to_s
@@ -60,8 +60,7 @@ module Pod
60
60
  output = `#{command}`.lines.to_a
61
61
 
62
62
  if $?.exitstatus != 0
63
- UI::BuildFailedReport.report(command, output)
64
- Process.exit
63
+ puts "command: #{command}, output: #{output}"
65
64
  end
66
65
  end
67
66
  end
@@ -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.8"
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.8
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