Change directory structure for the linux snapshot builds.

Fixes #224
This commit is contained in:
Robin Dunn
2017-02-07 13:03:34 -08:00
parent 5fc970e38e
commit 7b35940528
2 changed files with 12 additions and 9 deletions

View File

@@ -715,14 +715,17 @@ def uploadTree(srcPath, destPath, options, keep=5):
allDirs = allDirs.strip().split('\n')
allDirs.sort()
# Leave the last keep number of builds, including this new one, on the server.
# Delete the rest.
rmDirs = allDirs[:-keep]
for rmDir in rmDirs:
rmDir = opj(uploadDir, rmDir)
msg("Cleaning old build {}".format(rmDir))
cmd = 'ssh {} "rm -r {}"'.format(host, rmDir)
runcmd(cmd)
# TODO: Change this to clean out just the leaf folders rather than
# removing whole trees.
# # Leave the last keep number of builds, including this new one, on the server.
# # Delete the rest.
# rmDirs = allDirs[:-keep]
# for rmDir in rmDirs:
# rmDir = opj(uploadDir, rmDir)
# msg("Cleaning old build {}".format(rmDir))
# cmd = 'ssh {} "rm -r {}"'.format(host, rmDir)
# runcmd(cmd)
msg("Upload complete!")