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 +4 -4
- data/.idea/ocean_package.iml +1 -1
- data/Gemfile.lock +1 -1
- data/lib/ocean_package.rb +2 -2
- data/lib/ocean_package/command.rb +6 -2
- data/lib/ocean_package/package.rb +19 -1
- data/lib/ocean_package/pgy.rb +1 -0
- data/lib/ocean_package/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df5f1fd000b7d02b3625d23d9c84b75bde227f1675739c743cd8c1147905ce4f
|
4
|
+
data.tar.gz: e59dfeff667bb1d68c95f3cd2c03da8f9d5a10a2b3894b763c8c41763460d820
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e3db7f612b4b0639f58caa093769306c43a3b99874d735948dd192b98578f64816c6768d620cc2f6d08ff9af24c6b9e7fe7e124b3ccbc3c8c2cea1b4eeb8675
|
7
|
+
data.tar.gz: 727f0b9332fff05106eff0d660646408b74f2ceea3d905f93344921897e50e42ce3a5f239229c1a9bac1e8e084db3c5740d2695257ec4e36397d340e0366e592
|
data/.idea/ocean_package.iml
CHANGED
@@ -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.
|
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
data/lib/ocean_package.rb
CHANGED
@@ -37,7 +37,8 @@ module OceanPackage
|
|
37
37
|
scheme = argv.option("scheme", "")
|
38
38
|
Log.info("scheme: #{scheme}")
|
39
39
|
|
40
|
-
|
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
|
data/lib/ocean_package/pgy.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dingbot
|