Fix dSYM collection

(cherry picked from commit 78b0c5f50977036546c946646d24e3d34445b281)
This commit is contained in:
Isaac 2024-04-15 16:05:47 +04:00
parent 7319b8ec6f
commit e9d50f34de

View File

@ -608,7 +608,7 @@ def build(bazel, arguments):
if arguments.outputBuildArtifactsPath is not None:
artifacts_path = os.path.abspath(arguments.outputBuildArtifactsPath)
if os.path.exists(artifacts_path + '/Telegram.ipa'):
os.remove(path)
os.remove(artifacts_path + '/Telegram.ipa')
if os.path.exists(artifacts_path + '/DSYMs'):
shutil.rmtree(artifacts_path + '/DSYMs')
os.makedirs(artifacts_path, exist_ok=True)
@ -624,7 +624,7 @@ def build(bazel, arguments):
sys.exit(1)
shutil.copyfile(ipa_paths[0], artifacts_path + '/Telegram.ipa')
dsym_paths = glob.glob('bazel-bin/Telegram/**/*.dSYM')
dsym_paths = glob.glob('bazel-bin/Telegram/*.dSYM')
for dsym_path in dsym_paths:
file_name = os.path.basename(dsym_path)
shutil.copytree(dsym_path, artifacts_path + '/DSYMs/{}'.format(file_name))