Skip to content

Keep N most recent directories - #2

Merged
knownasilya merged 2 commits into
Strider-CD:masterfrom
smashwilson:keep-n-most-recent
Apr 23, 2016
Merged

Keep N most recent directories#2
knownasilya merged 2 commits into
Strider-CD:masterfrom
smashwilson:keep-n-most-recent

Conversation

@smashwilson

Copy link
Copy Markdown
Member

Dirkeeper currently deletes the oldest count subdirectories, rather than what the README documents, which is deleting everything but the most recent count subdirectories. The special-cased counts of 0 (to delete everything) and greater-than-the-number-of-subdirectories (to delete nothing) work correctly, but are inconsistent with the less-than-the-number-of-subdirectories case.

I've changed the relevant test to make the difference more obvious by keeping a count that's different than the number of directories that should be deleted, then changed the dirs array slice to delete all-but-the-newest-n so it passes.

@knownasilya

Copy link
Copy Markdown
Member

This might require a major version bump, since it worked completely different. Just making it 1.0 would be good.

@knownasilya

Copy link
Copy Markdown
Member

@niallo what do you think of moving this repo to the Strider org?

@knownasilya

Copy link
Copy Markdown
Member

Ping 👍

@knownasilya

Copy link
Copy Markdown
Member

@niallo ding ding ding 🔔 😸

@knownasilya

Copy link
Copy Markdown
Member

Hallo, anyone home 😉

@niallo

niallo commented Apr 23, 2016

Copy link
Copy Markdown
Member

@knownasilya done - moved! sorry for the delay

@knownasilya

Copy link
Copy Markdown
Member

Woot! My persistence paid off

@knownasilya
knownasilya merged commit a28dee7 into Strider-CD:master Apr 23, 2016
@knownasilya

Copy link
Copy Markdown
Member

Now I just need npm rights

@smashwilson
smashwilson deleted the keep-n-most-recent branch April 24, 2016 00:52
@niallo

niallo commented Apr 24, 2016

Copy link
Copy Markdown
Member

@knownasilya added on npm too!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants