Author: bodewig
Date: Tue Sep 20 17:52:26 2011
New Revision: 1173276
URL: http://svn.apache.org/viewvc?rev=1173276&view=rev
Log:
extract svn revision
Modified:
logging/log4net/trunk/log4net.build
Modified: logging/log4net/trunk/log4net.build
URL:
http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.build?rev=1173276&r1=1173275&r2=1173276&view=diff
==============================================================================
--- logging/log4net/trunk/log4net.build (original)
+++ logging/log4net/trunk/log4net.build Tue Sep 20 17:52:26 2011
@@ -1615,4 +1615,22 @@ limitations under the License.
<nant buildfile="${log4net.basedir}/extensions/nant.build"
target="compile" inheritall="false" />
</target>
+ <target name="set-build-number">
+ <if test="${not(property::exists('assembly.version.number'))}">
+ <property name="assembly.version.number" value="0"/>
+ <if test="${directory::exists('.svn')}">
+ <exec program="svn" workingdir="." verbose="false"
+ output="_svnrevision.xml" failonerror="true" >
+ <arg value="log" />
+ <arg line="--xml --limit 1 -q" />
+ </exec>
+ <sleep milliseconds="500" />
+ <xmlpeek file="_svnrevision.xml"
+ xpath="/log/logentry/@revision"
+ property="assembly.version.number"
+ failonerror="true"/>
+ <delete file="_svnrevision.xml"/>
+ </if>
+ </if>
+ </target>
</project>