Permalink
Browse files

Fix GRAILS-8950: overwrite existing CSS & js files when generating docs.

Although DocPublisher would overwrite CSS, js, and image files that the user provided, it wouldn't overwrite the existing files with the ones that come from grails-doc-files.jar. When a new JAR with new files came along, the user still ended up with the old files in the generated docs unless he did a clean. So, all copies are now overwrite: true.
  • Loading branch information...
1 parent c88ee69 commit 92362ab39ac22d1e97e569c7add353c6321cc75e @pledbrook pledbrook committed Mar 23, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 grails-docs/src/main/groovy/grails/doc/DocPublisher.groovy
@@ -155,7 +155,7 @@ class DocPublisher {
ant.mkdir(dir: jsDir)
ant.mkdir(dir: "${refDocsDir}/ref")
- ant.copy(todir: imgsDir) {
+ ant.copy(todir: imgsDir, overwrite: true) {
fileset(dir: "${docResources}/img")
}
@@ -164,15 +164,15 @@ class DocPublisher {
fileset(dir: images)
}
}
- ant.copy(todir: cssDir) {
+ ant.copy(todir: cssDir, overwrite: true) {
fileset(dir: "${docResources}/css")
}
if (css && css.exists()) {
ant.copy(todir: cssDir, overwrite: true, failonerror:false) {
fileset(dir: css)
}
}
- ant.copy(todir: jsDir) {
+ ant.copy(todir: jsDir, overwrite: true) {
fileset(dir: "${docResources}/js")
}
if (js && js.exists()) {

0 comments on commit 92362ab

Please sign in to comment.