Don't generate symbols if they aren't uploaded

Since the change to native symbol formats, the archived packages are huge and are
occupying too much disk space in Jenkins master. Therefore limit it to the case
in which they are really uploaded to backtrace and products released.
This commit is contained in:
Roland Rossgotterer
2019-05-06 14:59:49 +02:00
committed by Klaus Basan
parent 5f00747d19
commit 3d935485dd

View File

@@ -145,6 +145,10 @@ class Builder:
"""
Generates the binary symbols and archives them into a gzip archive, located in the swift source root.
"""
# Do not even generate symbols if they aren't used. They got so big now, that we cannot afford to archive them in Jenkins
if not upload_symbols:
return
if self._should_create_symbols():
build_path = self._get_swift_build_path()
os.chdir(build_path)
@@ -188,9 +192,7 @@ class Builder:
print('Adding ' + symbol_path)
tar.add(symbol_path, f)
tar.close()
if upload_symbols:
self.__upload_symbol_files(tar_path)
self.__upload_symbol_files(tar_path)
def _get_swift_source_path(self):
return self.__source_path