Open renandincer opened 8 years ago
One way to fix this could be finding out the latest deploy, removing the files that don't exist anymore in the new version after deploying the new version. [After deploy, list all html files, remove files that was not part of that deploy] But this might be an issue if there are .html files in the bucket that is not managed by Stout. Maybe add a --clean-up flag to indicate this behavior.
Another way of fixing this is finding out the currently active deploy (maybe through a file that keeps track of state in the bucket), diffing the files between the deploy to be restored and the current deploy and deleting the ones removed during this change.
Assume this scenerio where the current files are
if we were to revert to
c7ff515816e5
from950e80e70eb0
, page3.html would remain visible on the website. This is happening because in the source the contents of the version is being copied to the root with replace but not checking for already existing files.