cocoapods-mtxx-bin 0.0.4 → 0.0.6
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 +4 -4
- data/lib/cocoapods-mtxx-bin/command/bin/buildAll.rb +2 -1
- data/lib/cocoapods-mtxx-bin/command/bin/init.rb +1 -1
- data/lib/cocoapods-mtxx-bin/config/config.rb +16 -6
- data/lib/cocoapods-mtxx-bin/config/config_asker.rb +3 -3
- data/lib/cocoapods-mtxx-bin/gem_version.rb +1 -1
- data/lib/cocoapods-mtxx-bin/native/resolver.rb +3 -9
- data/lib/cocoapods-mtxx-bin/source_provider_hook.rb +2 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 689e939141bc2513daab20d64c674a0b30494d9d1112119bd7314c295cd3111c
|
4
|
+
data.tar.gz: 9985c74c4ee328babe08b8071053bd60726ed5e8a591a070c6c513e4e5beb444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2303bcbeb7703f42dcd5fefe29e74f3bc5a289e3a0568dbfa47386a54675d80f4ac78675dd317b277b73a14a48d50a5580b598afb02da6442017f7f4de266b9a
|
7
|
+
data.tar.gz: cbc7e1a3fefdfc9a2c02c3230b5c773c9045d99f67a3282bd6190a8439fe6d853a77fa8db04cd73c7a9680967e4f06d77dc8fc97a892defdd38880dda78cbdcd
|
@@ -2,6 +2,7 @@ require 'cocoapods-mtxx-bin/helpers/buildAll/builder'
|
|
2
2
|
require 'cocoapods-mtxx-bin/helpers/buildAll/podspec_util'
|
3
3
|
require 'cocoapods-mtxx-bin/helpers/buildAll/zip_file_helper'
|
4
4
|
require 'cocoapods-mtxx-bin/helpers/buildAll/bin_helper'
|
5
|
+
require 'cocoapods-mtxx-bin/config/config'
|
5
6
|
require 'yaml'
|
6
7
|
require 'digest'
|
7
8
|
|
@@ -71,7 +72,7 @@ module Pod
|
|
71
72
|
# 读取配置文件
|
72
73
|
def read_config
|
73
74
|
UI.title "Read config from file `BinConfig.yaml`".green do
|
74
|
-
config_file = File.join(
|
75
|
+
config_file = File.join(CBin.config.binary_dir, 'BinConfig.yaml')
|
75
76
|
return unless File.exist?(config_file)
|
76
77
|
config = YAML.load(File.open(config_file))
|
77
78
|
return if config.nil?
|
@@ -11,7 +11,7 @@ module Pod
|
|
11
11
|
|
12
12
|
def self.options
|
13
13
|
[
|
14
|
-
[
|
14
|
+
%w[--bin-url=URL 配置文件地址,直接从此地址下载配置文件],
|
15
15
|
['--update-sources', '更新源码私有源配置 bin_dev.yml 中的 code_repo_url_list 配置,支持多私有源,多个私有源用分号区分 example:git@techgit.meitu.com:iMeituPic/mtsourcespecs.git;git@techgit.meitu.com:iosmodules/specs.git;https://github.com/CocoaPods/Specs.git']
|
16
16
|
].concat(super)
|
17
17
|
end
|
@@ -13,12 +13,12 @@ module CBin
|
|
13
13
|
def template_hash
|
14
14
|
{
|
15
15
|
'configuration_env' => { description: '编译环境', default: 'dev', selection: %w[dev debug_iphoneos release_iphoneos] },
|
16
|
-
'code_repo_url_list' => { description: '源码私有源 Git
|
16
|
+
'code_repo_url_list' => { description: '源码私有源 Git 地址,多个私有源用分号区分', default: 'git@techgit.meitu.com:iMeituPic/mtsourcespecs.git' },
|
17
17
|
'binary_repo_url' => { description: '二进制私有源 Git 地址', default: 'git@techgit.meitu.com:iMeituPic/mtbinaryspecs.git' },
|
18
|
-
'binary_upload_url' => { description: '
|
18
|
+
'binary_upload_url' => { description: '二进制文件上传地址', default: 'http://pre.intapi.xiuxiu.meitu.com/internal/file/upload.json' },
|
19
19
|
# 'binary_type' => { description: '二进制打包类型', default: 'framework', selection: %w[framework library] },
|
20
|
-
'binary_download_url' => { description: '
|
21
|
-
'download_file_type' => { description: '
|
20
|
+
'binary_download_url' => { description: '二进制文件下载地址,内部会依次传入组件名称与版本,替换字符串中的 %s', default: 'https://manhattan-test.obs.cn-north-4.myhuaweicloud.com:443/ios/binary' },
|
21
|
+
'download_file_type' => { description: '二进制文件类型', default: 'zip', selection: %w[zip tgz tar tbz txz dmg] }
|
22
22
|
}
|
23
23
|
end
|
24
24
|
|
@@ -36,12 +36,22 @@ module CBin
|
|
36
36
|
raise "===== #{configuration_env} %w[dev debug_iphoneos release_iphoneos]===="
|
37
37
|
end
|
38
38
|
|
39
|
-
File.expand_path("#{Pod::Config.instance.home_dir}/#{file}")
|
39
|
+
# File.expand_path("#{Pod::Config.instance.home_dir}/#{file}")
|
40
|
+
File.expand_path("#{binary_dir}/#{file}")
|
40
41
|
end
|
41
42
|
|
42
43
|
def config_file_with_configuration_env_list(configuration_env)
|
43
44
|
file = config_dev_file
|
44
|
-
File.expand_path("#{Pod::Config.instance.home_dir}/#{file}")
|
45
|
+
# File.expand_path("#{Pod::Config.instance.home_dir}/#{file}")
|
46
|
+
File.expand_path("#{binary_dir}/#{file}")
|
47
|
+
end
|
48
|
+
|
49
|
+
def binary_dir
|
50
|
+
@binary_dir ||= begin
|
51
|
+
binary_dir = "#{Pod::Config.instance.project_root}/binary"
|
52
|
+
FileUtils.mkdir(binary_dir) unless File.exist?(binary_dir)
|
53
|
+
binary_dir
|
54
|
+
end
|
45
55
|
end
|
46
56
|
|
47
57
|
def configuration_env
|
@@ -40,10 +40,10 @@ module CBin
|
|
40
40
|
def wellcome_message
|
41
41
|
print <<~EOF
|
42
42
|
|
43
|
-
|
43
|
+
设置插件配置信息.
|
44
44
|
所有的信息都会保存在 #{CBin.config.config_file} 文件中.
|
45
|
-
|
46
|
-
|
45
|
+
你可以在对应目录下手动添加编辑该文件.
|
46
|
+
文件包含的配置信息样式如下:
|
47
47
|
|
48
48
|
#{CBin.config.default_config.to_yaml}
|
49
49
|
EOF
|
@@ -8,6 +8,7 @@ require 'cocoapods-mtxx-bin/native/installation_options'
|
|
8
8
|
require 'cocoapods-mtxx-bin/gem_version'
|
9
9
|
require 'cocoapods-mtxx-bin/command/bin/archive'
|
10
10
|
require 'cocoapods-mtxx-bin/helpers/buildAll/bin_helper'
|
11
|
+
require 'cocoapods-mtxx-bin/config/config'
|
11
12
|
|
12
13
|
module Pod
|
13
14
|
class Resolver
|
@@ -90,8 +91,8 @@ module Pod
|
|
90
91
|
|
91
92
|
# 读取黑名单
|
92
93
|
def read_black_list
|
93
|
-
|
94
|
-
config_file = File.join(
|
94
|
+
binary_dir = CBin.config.binary_dir
|
95
|
+
config_file = File.join(binary_dir, 'BinConfig.yaml')
|
95
96
|
return nil unless File.exist?(config_file)
|
96
97
|
config = YAML.load(File.open(config_file))
|
97
98
|
return nil if config.nil?
|
@@ -199,13 +200,6 @@ module Pod
|
|
199
200
|
|
200
201
|
UI.message "specification = #{specification}"
|
201
202
|
# 组件是 subspec
|
202
|
-
# subspec 需要特殊处理
|
203
|
-
# 如果是源码,则获取相应 subspec 的 specification
|
204
|
-
# 如果是二进制,则获取整个 specification
|
205
|
-
# if !use_binary && rspec.spec.subspec?
|
206
|
-
# specification = specification.subspec_by_name(rspec.name, false, true)
|
207
|
-
# end
|
208
|
-
|
209
203
|
if rspec.spec.subspec?
|
210
204
|
specification = specification.subspec_by_name(rspec.name, false, true)
|
211
205
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'cocoapods-mtxx-bin/native/sources_manager'
|
2
2
|
require 'cocoapods-mtxx-bin/command/bin/repo/update'
|
3
|
+
require 'cocoapods-mtxx-bin/config/config'
|
3
4
|
require 'cocoapods/user_interface'
|
4
5
|
require 'yaml'
|
5
6
|
|
@@ -44,7 +45,7 @@ Pod::HooksManager.register('cocoapods-mtxx-bin', :source_provider) do |context,
|
|
44
45
|
podfile = Pod::Config.instance.podfile
|
45
46
|
if podfile
|
46
47
|
# 读取配置文件
|
47
|
-
project_root =
|
48
|
+
project_root = CBin.config.binary_dir
|
48
49
|
config_file = File.join(project_root, 'BinConfig.yaml')
|
49
50
|
if File.exist?(config_file)
|
50
51
|
config = YAML.load(File.open(config_file))
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-mtxx-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.22.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.22.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cocoapods
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|