Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Commit

Permalink
Merge pull request #102 from twincitiesguy/feature-delete-existing-files
Browse files Browse the repository at this point in the history
add option to delete existing files in branch (default true - backward c...
  • Loading branch information
ajoberstar committed Feb 19, 2015
2 parents 33d23e5 + a0f4e95 commit cdf84d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class GithubPagesPlugin implements Plugin<Project> {
def filesList = extension.workingDir.list({ dir, name ->
return !name.equals('.git')
})
if (filesList) {
if (filesList && extension.deleteExistingFiles) {
repo.remove(patterns: filesList)
}
project.copy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ class GithubPagesPluginExtension implements AuthenticationSupported {
*/
Object workingPath = "${project.buildDir}/ghpages"

/**
* Whether to delete existing files in the branch, replacing the
* entire contents. Defaults to {@code true}.
*/
boolean deleteExistingFiles = true

/**
* The message used when committing changes to Github pages branch.
* Defaults to 'Publish of Github pages from Gradle.'.
Expand Down

0 comments on commit cdf84d3

Please sign in to comment.