Skip to content

Commit 9ca3802

Browse files
Fix package deployment following tests-syncer changes (#4687)
Fix a bug inserted in #4675, which was deleting the manifest file before uploading it to the GCP during deployment. Cherry-pick from #4683 into `master`.
1 parent 918d0c7 commit 9ca3802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/local/butler/package.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
MIN_SUPPORTED_NODEJS_VERSION = 4
2828

2929

30-
def _clear_zip(target_zip_path):
30+
def _clear_zip(target_zip_path, clear_manifest=True):
3131
"""Remove zip and manifest file."""
32-
if os.path.exists(constants.PACKAGE_TARGET_MANIFEST_PATH):
32+
if clear_manifest and os.path.exists(constants.PACKAGE_TARGET_MANIFEST_PATH):
3333
os.remove(constants.PACKAGE_TARGET_MANIFEST_PATH)
3434

3535
if os.path.exists(target_zip_path):
@@ -144,7 +144,7 @@ def package(revision,
144144
add_target_zip_name = utils.get_platform_deployment_filename(
145145
platform_name, release=add_release)
146146
add_target_zip_path = os.path.join(target_zip_dir, add_target_zip_name)
147-
_clear_zip(add_target_zip_path)
147+
_clear_zip(add_target_zip_path, clear_manifest=False)
148148
shutil.copy2(target_zip_path, add_target_zip_path)
149149
print('\n%s is ready.' % add_target_zip_path)
150150
targets_zip_paths.append(add_target_zip_path)

0 commit comments

Comments
 (0)