cocoapods-mtxx-bin 0.0.3 → 0.0.6

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: c18fc57de2d08c49e956f598907f2ff443b8fa45d678f3efe4d283f7b1e5d06a
4
- data.tar.gz: 236bb2f1d892cc19704ca68c821e9953fd000f98e55bf54c6eb12de47af02fd6
3
+ metadata.gz: 689e939141bc2513daab20d64c674a0b30494d9d1112119bd7314c295cd3111c
4
+ data.tar.gz: 9985c74c4ee328babe08b8071053bd60726ed5e8a591a070c6c513e4e5beb444
5
5
  SHA512:
6
- metadata.gz: f0e563796e362c9c8980a9d7ac161dfc38667bd4feddbab330de53b58a69c89868098abf69a8d5fb164c02bd7afcd888f1a8df456a57ca95d8323deec2e56599
7
- data.tar.gz: bd6017ec3927a02aae59bd02a78fa488e14bd4a481b1e4b20dced50b74ef7d71f96b1fcd4d97794dabc52a4f1347208e7b81ac59d30cc5e0b91f7e7e33fa89c7
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(Dir.pwd, 'BinConfig.yaml')
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
- ['--bin-url=URL', '配置文件地址,直接从此地址下载配置文件'],
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 地址 ,支持多私有源,多个私有源用分号区分', default: 'git@techgit.meitu.com:iMeituPic/mtsourcespecs.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: '二进制下载地址,内部会依次传入组件名称与版本', default: 'http://pre.intapi.xiuxiu.meitu.com/internal/file/upload.json' },
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: '二进制下载地址,内部会依次传入组件名称与版本,替换字符串中的 %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] }
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
- %w[bin_dev.yml bin_debug_iphoneos.yml bin_release_iphoneos.yml]
46
- 你可以在对应目录下手动添加编辑该文件. 文件包含的配置信息样式如下:
45
+ 你可以在对应目录下手动添加编辑该文件.
46
+ 文件包含的配置信息样式如下:
47
47
 
48
48
  #{CBin.config.default_config.to_yaml}
49
49
  EOF
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.6"
3
3
  end
4
4
 
5
5
  module Pod
@@ -233,7 +233,7 @@ ibtool \
233
233
  header_dir = headers_dir
234
234
  if @pod_target.uses_swift?
235
235
  umbrella_header = "#{product_dir}/#{iphoneos}/#{@pod_target}/#{@pod_target}-umbrella.h"
236
- swift_header = "#{product_dir}/#{iphoneos}/#{@pod_target}/Swift\\ Compatibility\\ Header/#{@pod_target.product_module_name}-Swift.h"
236
+ swift_header = "#{product_dir}/#{iphoneos}/#{@pod_target}/Swift Compatibility Header/#{@pod_target.product_module_name}-Swift.h"
237
237
  headers.concat([umbrella_header, swift_header])
238
238
  end
239
239
  else
@@ -94,25 +94,25 @@ module Pod
94
94
  end
95
95
  end
96
96
 
97
- alias old_write_lockfiles write_lockfiles
98
- def write_lockfiles
99
- old_write_lockfiles
100
- if File.exist?('Podfile_local')
101
-
102
- project = Xcodeproj::Project.open(config.sandbox.project_path)
103
- #获取主group
104
- group = project.main_group
105
- group.set_source_tree('SOURCE_ROOT')
106
- #向group中添加 文件引用
107
- file_ref = group.new_reference(config.sandbox.root + '../Podfile_local')
108
- #podfile_local排序
109
- podfile_local_group = group.children.last
110
- group.children.pop
111
- group.children.unshift(podfile_local_group)
112
- #保存
113
- project.save
114
- end
115
- end
97
+ # alias old_write_lockfiles write_lockfiles
98
+ # def write_lockfiles
99
+ # old_write_lockfiles
100
+ # if File.exist?('Podfile_local')
101
+ #
102
+ # project = Xcodeproj::Project.open(config.sandbox.project_path)
103
+ # #获取主group
104
+ # group = project.main_group
105
+ # group.set_source_tree('SOURCE_ROOT')
106
+ # #向group中添加 文件引用
107
+ # file_ref = group.new_reference(config.sandbox.root + '../Podfile_local')
108
+ # #podfile_local排序
109
+ # podfile_local_group = group.children.last
110
+ # group.children.pop
111
+ # group.children.unshift(podfile_local_group)
112
+ # #保存
113
+ # project.save
114
+ # end
115
+ # end
116
116
  end
117
117
 
118
118
  module Downloader
@@ -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
- project_root = Pod::Config.instance.project_root
94
- config_file = File.join(project_root, 'BinConfig.yaml')
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 = Pod::Config.instance.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,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-mtxx-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
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-21 00:00:00.000000000 Z
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: '0'
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: '0'
26
+ version: 1.22.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cocoapods
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.2
33
+ version: 1.10.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.11.2
40
+ version: 1.10.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cocoapods-generate
43
43
  requirement: !ruby/object:Gem::Requirement