LUCENE-3165: fail nicely if you try to do things that need a subversion checkout

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1129694 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-05-31 14:25:27 +00:00
parent 063d18e280
commit 41c0976f9e
1 changed files with 11 additions and 1 deletions

View File

@ -376,7 +376,7 @@
<!-- ================================================================== --> <!-- ================================================================== -->
<!-- Populates properties svn.URL and svn.Revision using "svn info". --> <!-- Populates properties svn.URL and svn.Revision using "svn info". -->
<!-- ================================================================== --> <!-- ================================================================== -->
<target name="get-svn-info"> <target name="get-svn-info" depends="check-svn">
<exec dir="." executable="${svn.exe}" outputproperty="svn.info" failonerror="true"> <exec dir="." executable="${svn.exe}" outputproperty="svn.info" failonerror="true">
<arg value="info"/> <arg value="info"/>
</exec> </exec>
@ -392,6 +392,16 @@
</loadproperties> </loadproperties>
</target> </target>
<target name="check-svn">
<sequential>
<exec dir="." executable="${svnversion.exe}" outputproperty="svn.ver"/>
<fail message="A subversion checkout is required for this target">
<condition>
<equals arg1="${svn.ver}" arg2="exported"/>
</condition>
</fail>
</sequential>
</target>
<!-- ================================================================== --> <!-- ================================================================== -->
<!-- same as package-tgz-src. it is just here for compatibility. --> <!-- same as package-tgz-src. it is just here for compatibility. -->