fix disappearing build logs when deploying

This commit is contained in:
Michael Pöhn 2019-10-15 14:28:45 +02:00
parent 6d11da5e13
commit d665106813

View file

@ -3253,10 +3253,9 @@ def deploy_build_log_with_rsync(appid, vercode, log_content):
logging.warning(_('skip deploying full build logs: log content is empty'))
return
with tempfile.TemporaryDirectory() as tmpdir:
# gzip compress log file
log_gz_path = os.path.join(
tmpdir, '{pkg}_{ver}.log.gz'.format(pkg=appid,
log_gz_path = os.path.join('repo',
'{pkg}_{ver}.log.gz'.format(pkg=appid,
ver=vercode))
with gzip.open(log_gz_path, 'wb') as f:
if isinstance(log_content, str):
@ -3321,6 +3320,7 @@ def is_repo_file(filename):
return os.path.isfile(filename) \
and not filename.endswith(b'.asc') \
and not filename.endswith(b'.sig') \
and not filename.endswith(b'.log.gz') \
and os.path.basename(filename) not in [
b'index.jar',
b'index_unsigned.jar',