summaryrefslogtreecommitdiff
path: root/distbuild-helper
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-10-09 15:09:03 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-10-10 13:01:26 +0000
commit340accc9a14dca989e161cbcbf1f5d732d44ff6f (patch)
tree9841205cafb45476cfd40bc2810d0c8bde59c715 /distbuild-helper
parent120b16734079e5899b04f76a8c3c37c9a3ae8b3a (diff)
downloadmorph-340accc9a14dca989e161cbcbf1f5d732d44ff6f.tar.gz
ssh-rsync: Don't delete version if it exists
A quirk in the resource cleanup code meant that if you gave the same version label when deploying a new version, then it would fail, then remove the old version, as it had assumed that it was the one to create those directories. This patch fixes this issue by making short context managers for all the resource allocation, so cleanup is done by walking up the context managers, so only the mount and the temporary directory need to be cleaned up if the `mkdir "$VERSION_ROOT"` fails. I've tested this with a deploy of a version that doesn't already exist, and the version I'm currently running, so I can conclusively say it's fixed that problem.
Diffstat (limited to 'distbuild-helper')
0 files changed, 0 insertions, 0 deletions