-
Notifications
You must be signed in to change notification settings - Fork 20
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
Provide includeFilter in cleanSite
and excludeFilter in cleanSite
#17
Conversation
Hi @arashi01, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement: |
CLA signed and submitted. |
Oh, and this sorts out #10 |
Any updates on PR? This seems useful to solve a problem I am having with the |
@jsuereth or @typesafehub-validator is there a reason this hasn't been merged in yet? I again stumbled into this for the purpose the PR was made: not clobbering older documentation for specific versions. It would be great to get an update whatever the status of the repo to know if we should use this plugin or something separate (eg still maintained or no longer maintained). |
@@ -1,5 +1,7 @@ | |||
package com.typesafe.sbt | |||
|
|||
import java.nio.file.Files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What feature in NIO that was needed that's not in sbt's IO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arashi01, consider isDirectory
provided by sbt.RichFile
.
This plugin is not maintained by Lightbend's sbt team, so I could help review this but ultimately it's up to the current maintainers. |
As per #10, I don't know if black list approach would is the answer here. I feel like it's safer to let the user declare white list of paths that sbt-ghpages should remove as a sequence of patterns. |
@eed3si9n agreed about the white-list based approach. I've removed the Files will only be deleted if they are accepted by the filter defined in The default settings are |
That looks good. Could you also add some documentation in the readme on how to use it, plz? |
…` settings to allow user specified FileFilters defining files which may be deleted. Update documentation with guide to protecting files.
9fd3713
to
048b148
Compare
Documentation updated to show example, and commits squashed + rebased against current. |
protectedFiles
setting key for files/directories which should not be cleaned or overwritten.includeFilter in cleanSite
and excludeFilter in cleanSite
Merged. Thanks for the contribution. |
We apparently can't set keys not defined in an *.sbt from the command line, so those needed to move. Once moved to *.sbt, the *.scala files can't see them to declare tasks, so the binding of values to the hack in Http4sGhPages also had to move. That's hopefully all temporary, because sbt/sbt-ghpages#17.
Was having an issue with using sbt-site with sbt-ghpages to publish current site and API documentation while retaining previous released API documentation folders. (ie
cleanSite
would wipe out everything already in the gh-pages branch).This adds a
protectedFiles
settingKey which allows one to specify aSeq[String]
of file or directory paths relative to the repository root which, if existing, should be excluded from clean and should not be overwritten.