Created
August 4, 2011 05:24
-
-
Save aeurielesn/1124550 to your computer and use it in GitHub Desktop.
ant script to get local revision number from the subversion's .svn/entries file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="svn" default="revision-number" basedir="."> | |
<target name="check-svn-entries"> | |
<available file=".svn/entries" property="svn.entries.present"/> | |
</target> | |
<target name="revision-number" depends="check-svn-entries" if="svn.entries.present"> | |
<loadfile srcfile=".svn/entries" property="revision"> | |
<filterchain> | |
<headfilter lines="1" skip="3"/> | |
</filterchain> | |
</loadfile> | |
<echo file="REVISION" message="${revision}"/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This seems to not work any more with SVN 1.7, the file entries contains "12", but I have a revision around 400000...