Fix a small problem where the "svnversion" command may output an error message and therefore creates invalid manifest (with special chars included). This checks with regex, if the returned SVN revision is according to spec, otherwise it writes "unknown" to manifest

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1684825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2015-06-11 08:19:46 +00:00
parent 9c3da51ec6
commit 307fb6e19b
1 changed files with 7 additions and 1 deletions

View File

@ -617,8 +617,14 @@
<attribute name="manifest.file" default="${manifest.file}"/>
<element name="additional-manifest-attributes" optional="true"/>
<sequential>
<local name="-svnversion-raw"/>
<local name="svnversion"/>
<!-- If possible, include the svnversion -->
<exec dir="." executable="${svnversion.exe}" outputproperty="svnversion" failifexecutionfails="false"/>
<exec dir="." executable="${svnversion.exe}" outputproperty="-svnversion-raw" failifexecutionfails="false"/>
<condition property="svnversion" value="${-svnversion-raw}" else="unknown">
<matches pattern="[\d:MSP]+" string="${-svnversion-raw}" casesensitive="true"/>
</condition>
<manifest file="@{manifest.file}">
<!--