cocoapods-modularization 0.2.5 → 0.2.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04016eb2b87c8f37843143c23e6aae3804b6edd0af79c03f84e5a55f0e590c11
|
4
|
+
data.tar.gz: c3f2c5c49472489c333335fa3f9872391f03502021bc5e2adecdebf514af9f7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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', '
|
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
|
-
@binary = argv.flag?('
|
22
|
+
@binary = argv.flag?('binary-only')
|
23
|
+
@framework = argv.flag?('framework-only')
|
22
24
|
super
|
23
25
|
end
|
24
26
|
|
@@ -32,7 +34,7 @@ module Pod
|
|
32
34
|
FileUtils.rm_rf(build_path)
|
33
35
|
end
|
34
36
|
|
35
|
-
`git clone
|
37
|
+
`git clone git@gitlab.appshahe.com:shared-specs/template.git .build`
|
36
38
|
|
37
39
|
unless File.exist?("#{Dir.pwd}/.build")
|
38
40
|
puts "./.build not found"
|
@@ -40,7 +42,9 @@ module Pod
|
|
40
42
|
end
|
41
43
|
|
42
44
|
if @binary
|
43
|
-
FileUtils.mv("#{Dir.pwd}/.build/Binary/
|
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
|
@@ -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.
|
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-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|