ocean_package 0.10.0 → 0.11.0

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: b1cc955eed6aa74ce48c6a3cc59c5bda438162073b8e86f04ec75261badf3e10
4
- data.tar.gz: 5bfbf7f168a9436e6c07245c9ec2455ab66e3e4b5df4e517d52202a599afb778
3
+ metadata.gz: df5f1fd000b7d02b3625d23d9c84b75bde227f1675739c743cd8c1147905ce4f
4
+ data.tar.gz: e59dfeff667bb1d68c95f3cd2c03da8f9d5a10a2b3894b763c8c41763460d820
5
5
  SHA512:
6
- metadata.gz: 10f73f3b8c22d9551656918c397475cc82ddc2bedaac49bb6b57164b38033166a65d4e81cb7815ab589ecb3b2a38ca1fe52d84da41084cd66b7364a1f420fa74
7
- data.tar.gz: c6af45c8b814831a267e29a43c6f89ba328b6bc7d0784a11e676328bc74c631152cea7b693438bf4124e06514eafae39761b362e758a019f8d545ffc3b321aa4
6
+ metadata.gz: 2e3db7f612b4b0639f58caa093769306c43a3b99874d735948dd192b98578f64816c6768d620cc2f6d08ff9af24c6b9e7fe7e124b3ccbc3c8c2cea1b4eeb8675
7
+ data.tar.gz: 727f0b9332fff05106eff0d660646408b74f2ceea3d905f93344921897e50e42ce3a5f239229c1a9bac1e8e084db3c5740d2695257ec4e36397d340e0366e592
@@ -20,7 +20,7 @@
20
20
  <orderEntry type="library" scope="PROVIDED" name="httparty (v0.18.1, ruby-2.6.3-p62) [gem]" level="application" />
21
21
  <orderEntry type="library" scope="PROVIDED" name="mime-types (v3.3.1, ruby-2.6.3-p62) [gem]" level="application" />
22
22
  <orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2020.0512, ruby-2.6.3-p62) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.6.3-p62) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.12.0, ruby-2.6.3-p62) [gem]" level="application" />
24
24
  <orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.6.0, ruby-2.6.3-p62) [gem]" level="application" />
25
25
  <orderEntry type="library" scope="PROVIDED" name="multipart-post (v2.1.1, ruby-2.6.3-p62) [gem]" level="application" />
26
26
  <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.6.3-p62) [gem]" level="application" />
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ocean_package (0.9.0)
4
+ ocean_package (0.10.0)
5
5
  CFPropertyList
6
6
  dingbot
7
7
  faraday
data/lib/ocean_package.rb CHANGED
@@ -23,9 +23,9 @@ module OceanPackage
23
23
  require 'claide'
24
24
 
25
25
  def self.run(argvs)
26
- puts "====="
26
+ puts "=========ARGV========="
27
27
  puts ARGV
28
- puts "====="
28
+ puts "=========ARGV========="
29
29
 
30
30
  command = OceanPackage::Command.new(argvs)
31
31
  command.run
@@ -37,7 +37,8 @@ module OceanPackage
37
37
  scheme = argv.option("scheme", "")
38
38
  Log.info("scheme: #{scheme}")
39
39
 
40
- configuration = argv.option("configuration", OceanPackage::Constants::DEFAULT_CONFIGURATION)
40
+ # 默认配置改为空,防止包环境错误
41
+ configuration = argv.option("configuration", "")
41
42
  Log.info("configuration: #{configuration}")
42
43
 
43
44
  archive_path = argv.option("archive-path", OceanPackage::Constants::DEFAULT_ARCHIVE_PATH)
@@ -54,10 +55,13 @@ module OceanPackage
54
55
  Log.info("ipa_file_path: #{ipa_file_path}")
55
56
  @custom_ipa_file_path = ipa_file_path
56
57
 
58
+ extra_export_params = argv.option("extra-export-params", "")
59
+ Log.info("extra-export-params: #{extra_export_params}")
60
+
57
61
  # 自定义ipa文件,使用该文件作为 archive path
58
62
  tmp_archive_path = has_custom_ipa_file ? File.dirname("#{ipa_file_path}") : archive_path
59
63
  Log.info("tmp_archive_path: #{tmp_archive_path}")
60
- @package = OceanPackage::Package.new(workspace_path, scheme, configuration, tmp_archive_path, company_name, export_options_plist)
64
+ @package = OceanPackage::Package.new(workspace_path, scheme, configuration, tmp_archive_path, company_name, export_options_plist, extra_export_params)
61
65
 
62
66
  fir_token = argv.option("fir-token", "")
63
67
  Log.info("fir_token: #{fir_token}")
@@ -9,6 +9,8 @@ module OceanPackage
9
9
  attr_accessor :scheme
10
10
  # 配置信息: Debug, Release
11
11
  attr_accessor :configuration
12
+ # 额外的打底参数,比如对buildsettings进行重写
13
+ attr_accessor :extra_export_params
12
14
 
13
15
  # archive 归档路径
14
16
  attr_accessor :archive_path
@@ -25,7 +27,7 @@ module OceanPackage
25
27
  # 结束时间
26
28
  attr_accessor :end_time
27
29
 
28
- def initialize(workspace_path, scheme, configuration, archive_path, company_name, export_options_plist)
30
+ def initialize(workspace_path, scheme, configuration, archive_path, company_name, export_options_plist, extra_export_params)
29
31
  @workspace_path = workspace_path
30
32
  @scheme = scheme
31
33
  @configuration = configuration
@@ -33,6 +35,7 @@ module OceanPackage
33
35
  @company_name = company_name
34
36
  @date_time = Time.new.strftime("%Y-%m-%d_%H-%M-%S")
35
37
  @export_options_plist = export_options_plist
38
+ @extra_export_params = extra_export_params
36
39
 
37
40
  # 预设置开始时间
38
41
  @start_time = Time.now
@@ -56,9 +59,13 @@ module OceanPackage
56
59
  # 执行打包相关命令
57
60
  def run
58
61
  @start_time = Time.now
62
+ # 检查必须参数
59
63
  check
64
+ # clean 项目
60
65
  clean
66
+ # 打包项目
61
67
  archive
68
+ # 导出 ipa 包
62
69
  export
63
70
  @end_time = Time.now
64
71
  # 返回打包成功的 ipa 文件路径
@@ -215,6 +222,17 @@ module OceanPackage
215
222
  cmd += ' -exportPath ' + final_archive_path
216
223
  cmd += ' -exportOptionsPlist ' + @export_options_plist
217
224
 
225
+ unless "#{@extra_export_params}".empty?
226
+ # 分割
227
+ params = "#{@extra_export_params}".split(",")
228
+ # 再拼接
229
+ joined_string = params.join(" ")
230
+
231
+ unless joined_string.empty?
232
+ cmd += ' ' + joined_string
233
+ end
234
+ end
235
+
218
236
  Log.divider
219
237
  Log.info("export command: #{cmd}")
220
238
  Log.divider
@@ -107,6 +107,7 @@ module OceanPackage
107
107
  # 响应是字符串类型,需要转为json进行处理
108
108
  json_value = JSON.parse(res.body)
109
109
  Log.divider
110
+ Log.info('pgy upload response: ')
110
111
  Log.info(json_value)
111
112
  # 成功
112
113
  data = json_value["data"]
@@ -1,3 +1,3 @@
1
1
  module OceanPackage
2
- VERSION = "0.10.0"
2
+ VERSION = "0.11.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean_package
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ocean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-31 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dingbot