Created
July 8, 2011 18:05
-
-
Save j4y/1072391 to your computer and use it in GitHub Desktop.
ant script to get a cvs branch name from the CVS tag file
This file contains 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
<project name="ant script to get a cvs branch name from the CVS tag file" basedir="."> | |
<loadfile property="cvs.tag" srcFile="CVS/Tag" failonerror="false"> | |
<filterchain> | |
<striplinebreaks/> | |
<tokenfilter> | |
<replaceregex pattern="^T" replace="" /> | |
<replaceregex pattern="^D.*" replace="HEAD" /> | |
</tokenfilter> | |
</filterchain> | |
</loadfile> | |
<!-- default to HEAD if the Tag file is missing --> | |
<property name="cvs.tag" value="HEAD" /> | |
<echo file="CVS_TAG">${cvs.tag}</echo> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment