def _create_archive(self, archive_path, export_dir):
"""
Create the final archive of all the exported project files.
Args:
archive_path: Path to the ``tar.xz`` archive.
export_dir: Path to the directory containing the files to export.
"""
try:
logger.info('Creating archive %s', archive_path)
create_archive = tar.bake(create=True, xz=True, verbose=True,
file=archive_path, directory=export_dir,
_fg=True, _out=sys.stdout,
_err=sys.stderr)
create_archive(self._project_name)
except ErrorReturnCode as e:
raise CommandError('Failed to archive project - %s' % e)
评论列表
文章目录