Skip to content

Commit

Permalink
Don't kill the build if the proofing directory can't be deleted.
Browse files Browse the repository at this point in the history
For example, if the directory doesn't exist because this is the
first time we're running "makeInternalPreview", the <delete> task
shouldn't fail.

Also, delete the empty `dhq-proofing/vol/` directory created by
"generateArticles" when we're not proofing the full site.
  • Loading branch information
amclark42 committed Jul 5, 2024
1 parent d701c4d commit 7e25a20
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,11 @@ compressStatic
validargs="true,false"
>Do you want to proof the full DHQ site? If so, type "true".
To proof only the internal preview, hit the return key or type "false".</input>
<!-- Delete the contents of the proofing directory before beginning. This
<!-- Delete any contents of the proofing directory before beginning. This
ensures that the same directory can be re-used for a full site proofing
endeavor as for an editorial-only endeavor. -->
<delete includeemptydirs="true">
<delete includeemptydirs="true"
failonerror="false">
<fileset dir="${toDir.proofing.path}" includes="**/*"/>
</delete>
<!-- If we're only generating the Internal Preview, run "generateIssues". Then,
Expand All @@ -293,6 +294,10 @@ To proof only the internal preview, hit the return key or type "false".</input>
<ant unless:true="${do.proofing.full}"
antfile="${toDir.base.path}${file.separator}article-map.xml"
target="copyArticleResources" inheritRefs="true"/>
<!-- Since "generateIssues" creates the "vol" directory, we delete it if we are
only generating the editorial section. -->
<delete unless:true="${do.proofing.full}"
dir="${toDir.proofing.path}${file.separator}vol"/>
<!-- Generate the sorted article lists hosted alongside `editorial/index.html`. -->
<echo>Generating list of DHQ articles from TOC</echo>
<xslt in="toc${file.separator}toc.xml"
Expand Down

0 comments on commit 7e25a20

Please sign in to comment.