Skip to content
This repository was archived by the owner on Mar 23, 2018. It is now read-only.

Add keepReleases option#10

Open
stream7 wants to merge 1 commit intogpbl:masterfrom
stream7:master
Open

Add keepReleases option#10
stream7 wants to merge 1 commit intogpbl:masterfrom
stream7:master

Conversation

@stream7
Copy link

@stream7 stream7 commented Jul 19, 2016

This PR implements the keepReleases options similarly to keep_releases in capistrano

Please let me know if you think this should be merged and I'll add some documentation. Thanks!

@gpbl
Copy link
Owner

gpbl commented Sep 18, 2016

Hi @stream7, thanks for this PR! Sorry for the late answer – but as I'm not familiar with capistrano's keep_releases, would you mind to explain better what a keepReleases option should do? So I can review your PR 😄

@stream7
Copy link
Author

stream7 commented Sep 18, 2016

Hey @gpbl, it tracks the files of the last n (keep_releases) releases and keeps them in the filesystem so that for example users of a SPA that are on an old version (haven't refreshed the page and thus haven't received the latest version) don't get 404s when a new version is deployed.

Does that make sense to you?

@gpbl
Copy link
Owner

gpbl commented Sep 18, 2016

Yes now I understand the principle, thanks 👍 Actually, this was something I'd liked to implement from the begin.

I'd like to discuss better the implementation with your help:

  • read the last n webpack stats (actually, its assets object) from a releases subdirectory and add the assets path contained in it to the exclude option
  • save the current stats in a JSON timestamp file in the releases subdirectory
  • the releases subdirectory should be excluded as default
  • (should the "older" stats in the releases subdir removed as well?)

Would be this correct? I've cleaned up a bit the code and added a test suite so we can work better on this feature.

@stream7
Copy link
Author

stream7 commented Sep 18, 2016

That is 100% correct, thanks! 👍

(should the "older" stats in the releases subdir removed as well?)

I believe that's the case already in my implementation. See here

@davegonzalez
Copy link

What's the status of this feature? We're migrating from using the Rails asset pipeline to Webpack and I'd love to use this in our config. Is it something that could use some help?

@gpbl
Copy link
Owner

gpbl commented Feb 12, 2017

@davegonzalez @stream7 could fix the conflicts and add tests! then I can merge this 👍

@cbarratt
Copy link

Also after this feature! :) Would be happy to look into the conflicts and create another PR if this is not showing signs of progression

@gpbl
Copy link
Owner

gpbl commented Mar 24, 2017

@cbarratt please do 👍🏽🙏🏽

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants