Changeset 7797


Ignore:
Timestamp:
Apr 9, 2020, 9:19:19 AM (22 months ago)
Author:
Nicklas Nordborg
Message:

References #2205: Update ant task that uses svn commands

The docbook builder task also used svn to get information about when the documentation was last changed. It has been updated to use SvnKit.

Location:
branches/3.16-stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.16-stable/build.xml

    r7796 r7797  
    11131113    <ant antfile="${lib}/docbook/ant-build-docbook.xml" inheritall="false" target="html.chunked">
    11141114      <property name="ant.docbook.styler.dir" location="${lib}/docbook" />
     1115      <property name="svnkit.dir" location="${lib}/svnkit" />
    11151116      <property name="docbook.xml.dir" location="${docbook.src}" />
    11161117      <property name="docbook.resources.dir" location="${docbook.src}/figures" />
  • branches/3.16-stable/lib/docbook/ant-build-docbook.xml

    r6490 r7797  
    4646    <pathelement path="${ant.docbook.styler.dir}/ant-extensions" />
    4747  </path>
    48 
    49    <svnSetting id="svnSettings" dateFormatter="${dateformat}" />
    5048 
     49  <path id="lib.svnkit.classpath">
     50    <fileset dir="${svnkit.dir}">
     51      <include name="**/*.jar"/>
     52    </fileset>
     53  </path>
     54
    5155  <!-- ##################################### -->
    5256  <!-- ### {{{ CHECK REQUIRED PROPS      ### -->
     
    250254   
    251255    <!-- Get the revision number and the datetime when the latest file was commited -->
    252     <svn refid="svnSettings">
    253     <status path="../../doc/src/docbook" lastChangedRevisionProperty="doc.revision" />
    254       <status path="../../doc/src/docbook" lastChangedDateProperty="doc.last.modified" />
    255   </svn>
     256  <java
     257    classname="org.tmatesoft.svn.cli.SVN"
     258    classpathref="lib.svnkit.classpath"
     259    outputproperty="svn.info.docbook"
     260    >
     261    <arg value="info" />
     262    <arg path="${docbook.xml.dir}" />
     263  </java>
    256264   
     265  <loadresource property="doc.revision"
     266    description="Scan output from 'svn info' and keep only the line with 'Last Changed Rev:'"
     267    >
     268    <concat>${svn.info.docbook}</concat>
     269    <filterchain>
     270      <linecontains><contains value="Last Changed Rev" /></linecontains>
     271      <replaceregex pattern=".*?(\d+)" replace="\1" />
     272      <striplinebreaks/>
     273    </filterchain>
     274  </loadresource>
     275   
     276  <loadresource property="doc.last.modified"
     277    description="Scan output from 'svn info' and keep only the line with 'Last Changed Date:'"
     278    >
     279    <concat>${svn.info.docbook}</concat>
     280    <filterchain>
     281      <linecontains><contains value="Last Changed Date" /></linecontains>
     282      <replaceregex pattern=".*?(\d{4}\-\d{2}\-\d{2}).*" replace="\1" />
     283      <striplinebreaks/>
     284    </filterchain>
     285  </loadresource>
     286
    257287    <copy file="${docbook.styles}/${docbook.style}/xsl/customized.chunked.xsl"
    258288          tofile="${build.dir}/customized.chunked.xsl.tmp"
Note: See TracChangeset for help on using the changeset viewer.