mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
89e9a6f583
@ -13,6 +13,7 @@ import os.path
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
|
import shutil
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# python3
|
# python3
|
||||||
@ -48,10 +49,11 @@ def move_bundles(source, dest):
|
|||||||
for f in os.listdir(source):
|
for f in os.listdir(source):
|
||||||
dst = os.path.join(dest, f)
|
dst = os.path.join(dest, f)
|
||||||
if os.path.exists(dst):
|
if os.path.exists(dst):
|
||||||
raise DeployException(
|
print (
|
||||||
"Not deploying. The bundle includes '%s' which we have previously deployed."
|
"Skipping bundle. The bundle includes '%s' which we have previously deployed."
|
||||||
% f
|
% f
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
renames[os.path.join(source, f)] = dst
|
renames[os.path.join(source, f)] = dst
|
||||||
|
|
||||||
for (src, dst) in renames.iteritems():
|
for (src, dst) in renames.iteritems():
|
||||||
@ -107,9 +109,9 @@ class Deployer:
|
|||||||
extracted_bundles = os.path.join(extracted_dir, 'bundles')
|
extracted_bundles = os.path.join(extracted_dir, 'bundles')
|
||||||
move_bundles(source=extracted_bundles, dest=self.bundles_path)
|
move_bundles(source=extracted_bundles, dest=self.bundles_path)
|
||||||
|
|
||||||
# replace the (hopefully now empty) extracted_bundles dir with a
|
# replace the extracted_bundles dir (which may not be empty if some
|
||||||
# symlink to the common dir.
|
# bundles were skipped) with a symlink to the common dir.
|
||||||
os.rmdir(extracted_bundles)
|
shutil.rmtree(extracted_bundles)
|
||||||
create_relative_symlink(
|
create_relative_symlink(
|
||||||
target=self.bundles_path,
|
target=self.bundles_path,
|
||||||
linkname=extracted_bundles,
|
linkname=extracted_bundles,
|
||||||
|
Loading…
Reference in New Issue
Block a user