You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

publish.xml 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0"?>
  2. <!--
  3. Copyright 2005-2006 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!--
  15. This is the publishing file for ForrestBot.
  16. Running "ant -f publish.xml" will build the FOP site and deploy it using SCP on xmlgraphics.apache.org/fop.
  17. $Id$
  18. -->
  19. <project name="forrest-docs" default="main">
  20. <property name="build.work-dir" location="./build/forrest/work"/>
  21. <property name="build.log-dir" location="./build/forrest/log"/>
  22. <property name="getsrc.local.root-dir" location="."/>
  23. <!--property name="getsrc.svn.url" value="http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk"/-->
  24. <target name="getsrc" depends="getsrc.clean-workdir, getsrc.local"/>
  25. <!-- create this secret file to be an ant project (not stored in CVS or SVN)
  26. that sets deploy.scp.user and deploy.scp.keyfile properties.
  27. See forrest/etc/publishing_our_site.txt
  28. Here's an example of such a file (place it one directory above the checkout directory):
  29. <project>
  30. <property name="deploy.scp.user" value="johndoe"/>
  31. <property name="deploy.scp.keyfile" value="/path/to/my/private/key"/>
  32. </project>
  33. -->
  34. <import file="../deploy.settings" optional="true"/>
  35. <property name="deploy.scp.host" value="people.apache.org"/>
  36. <property name="deploy.scp.dest" value="${deploy.scp.user}@${deploy.scp.host}:/www/xmlgraphics.apache.org/fop"/>
  37. <target name="deploy.scp-alt" unless="build.failed" description="FB: Deploy to a remote location via scp">
  38. <if>
  39. <not><isset property="deploy.scp.passphrase"/></not>
  40. <then>
  41. <input addproperty="deploy.scp.passphrase" message="Enter passphrase for your private key for scp to ${deploy.scp.dest}:"/>
  42. </then>
  43. </if>
  44. <scp todir="${deploy.scp.dest}" keyfile="${deploy.scp.keyfile}" passphrase="${deploy.scp.passphrase}">
  45. <fileset dir="${build.site-dir}"/>
  46. </scp>
  47. </target>
  48. <target name="deploy.remote.fix.perms" depends="deploy.scp-alt" unless="build.failed" description="Fixes group permissions on newly uploaded files">
  49. <if>
  50. <not><isset property="deploy.scp.passphrase"/></not>
  51. <then>
  52. <input addproperty="deploy.scp.passphrase" message="Enter passphrase for your private key for scp to ${deploy.scp.dest}:"/>
  53. </then>
  54. </if>
  55. <!-- this is necessary because new files are not group writable -->
  56. <sshexec host="${deploy.scp.host}" username="${deploy.scp.user}"
  57. keyfile="${deploy.scp.keyfile}" passphrase="${deploy.scp.passphrase}"
  58. command="cd /www/xmlgraphics.apache.org/fop;chgrp -R xmlgraphics *;chmod -R g+rw *"/>
  59. </target>
  60. <target name="deploy" depends="deploy.scp-alt, deploy.remote.fix.perms"/>
  61. <property environment="env"/>
  62. <import file="${env.FORREST_HOME}/tools/forrestbot/core/forrestbot.xml"/>
  63. </project>