cloudflare / Stout

A reliable static website deploy tool
MIT License
751 stars 29 forks source link

Old resources are not automatically deleted in S3 bucket #15

Open lijuno opened 8 years ago

lijuno commented 8 years ago

First of all, stout is a great tool! The only problem for me is, when some files are removed in a newer version on my local computer, their counterparts in the S3 bucket are still there after I do stout deploy (although I do see a new folder with the correct file hierarchy in the same bucket). I am just wondering if I missed anything here.

zackbloom commented 8 years ago

Hi @lijunhw, You are absolutely correct that Stout does not attempt to delete old files at the moment. It hasn't been a huge priority for us, as old files in S3 aren't much of an inconvenience or cost to us personally. We do however include the timestamp when files were created in their name, to make it easy to write a script which cleans up old files. I would also be very interested in integrating a auto-delete feature into Stout, if someone is interested in making a PR.

renandincer commented 8 years ago

Similar issue with revert: https://github.com/EagerIO/Stout/issues/24

tmaier commented 7 years ago

AWS would allow to set an expiration date for files.

http://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html

After a deploy, the tool could set previous versions to expire after x weeks.