Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about providing an option to delete selectively? #19

Open
lu911 opened this issue Jun 21, 2018 · 2 comments
Open

What about providing an option to delete selectively? #19

lu911 opened this issue Jun 21, 2018 · 2 comments
Assignees

Comments

@lu911
Copy link
Contributor

lu911 commented Jun 21, 2018

I'm serving a react app from S3 and when I deploy previsously depolyed files get deleted. But I need to stay undeleted, if not my app dies for the duration of invalidation.

Currently there is a dry option in deploy function which is a logic to not delete files under current directory. How about we use this option to achieve my need?

@jonls jonls self-assigned this Jul 5, 2018
@jonls
Copy link
Owner

jonls commented Jul 6, 2018

I'm not sure I understand exactly what the issue is. Can you provide a more detailed scenario of what's happening currently and what you'd like to happen.

I'm not sure if the dry run option is something you can use here since during the dry run, nothing will change in the bucket or distribution.

@jonls jonls removed their assignment Jul 6, 2018
@charlax
Copy link

charlax commented Aug 23, 2018

I looked into using s3-deploy-website and I have the same issue.

To simplify: say your app's filename change with each build (e.g. app-854421.js becomes app-652821.js. The fact that s3-deploy-website deletes before uploading means that the website will become unavailable until the new version is deployed.

A simple fix would be to delete the file after the new files after been uploaded. Should be just about moving around some code.

Your point about dry-mode not being a solution to this is spot on.

@jonls jonls self-assigned this Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants