未验证 提交 7c629799 编写于 作者: O openharmony_ci 提交者: Gitee

!490 Package image files after compilation

Merge pull request !490 from weifulun/package_image
......@@ -153,6 +153,7 @@ class Build():
post_build = PostBuild(self.config)
post_build.clean(self.start_time)
post_build.patch_ohos_para(cmd_args)
post_build.package_image()
output_part_rom_status(self.config.root_path)
hb_info(f'{os.path.basename(self.config.out_path)} build success')
......
......@@ -131,7 +131,14 @@ class PostBuild:
data += line
with open(ohos_para_file_path, 'w', encoding='utf-8') as ohos_para_file:
ohos_para_file.write(data)
def package_image(self):
image_path = os.path.join(self._out_path, 'packages/phone/images/')
if os.path.exists(image_path):
packaged_file_path = os.path.join(self._out_path, 'images.tar.gz')
cmd = ['tar', '-zcvf', packaged_file_path, image_path]
exec_command(cmd, log_path=self._log_path)
def stat_pycache(self):
cmd = [
'python3', '{}/build/scripts/util/pyd.py'.format(self._root_path),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册