mirror of https://github.com/FreeCol/freecol.git
Add git-revision ant target now we have a git repo.
This commit is contained in:
parent
330b25f96c
commit
bbfa216810
44
build.xml
44
build.xml
|
@ -127,28 +127,40 @@
|
|||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="svnproperties" unless="svn.Revision"
|
||||
description="Creates the svn properties file using svn">
|
||||
<condition property="have-revision">
|
||||
<isset property="FreeCol.Revision" />
|
||||
</condition>
|
||||
|
||||
<target name="git-raw-revision" unless="have-revision"
|
||||
description="Set gitRawRevision property using git">
|
||||
<exec executable="git" failifexecutionfails="false"
|
||||
outputproperty="gitRawRevision" logError="true">
|
||||
<arg value="rev-parse"/>
|
||||
<arg value="HEAD"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="git-revision" unless="have-revision"
|
||||
depends="git-raw-revision" if="gitRawRevision"
|
||||
description="Set FreeCol.Revision from gitRawRevision using git">
|
||||
<exec executable="git" failifexecutionfails="false"
|
||||
outputproperty="FreeCol.Revision" logError="true">
|
||||
<arg value="describe"/>
|
||||
<arg value="--always"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="svnproperties" unless="have-revision"
|
||||
description="Creates the svn properties file using svn, setting FreeCol.Revision">
|
||||
<exec executable="svn" failifexecutionfails="false"
|
||||
output="${basedir}/build/svn.properties">
|
||||
<arg value="info"/>
|
||||
<arg value="."/>
|
||||
</exec>
|
||||
<property prefix="svn" file="build/svn.properties"/>
|
||||
<property prefix="FreeCol" file="build/svn.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="gitproperties" unless="svn.Revision"
|
||||
description="Creates the svn properties file using git">
|
||||
<exec executable="git" failifexecutionfails="false"
|
||||
output="${basedir}/build/svn.properties">
|
||||
<arg value="svn"/>
|
||||
<arg value="info"/>
|
||||
<arg value="."/>
|
||||
</exec>
|
||||
<property prefix="svn" file="build/svn.properties"/>
|
||||
</target>
|
||||
|
||||
<target name="manifest" depends="svnproperties,gitproperties"
|
||||
<target name="manifest" depends="git-revision,svnproperties"
|
||||
description="Creates the Manifest file.">
|
||||
<manifest file="${basedir}/src/MANIFEST.MF">
|
||||
<attribute name="Created-By" value="FreeCol Team"/>
|
||||
|
@ -156,7 +168,7 @@
|
|||
<attribute name="Class-Path" value="jars/jogg-0.0.7.jar jars/jorbis-0.0.15.jar ${miglayout.jar} ${cli.jar} ${cortado.jar}"/>
|
||||
<attribute name="Product-Name" value="FreeCol"/>
|
||||
<attribute name="Package-Title" value="FreeCol"/>
|
||||
<attribute name="Package-Version" value="${svn.Revision}"/>
|
||||
<attribute name="Package-Version" value="${FreeCol.Revision}"/>
|
||||
<attribute name="Package-Vendor" value="FreeCol Team"/>
|
||||
</manifest>
|
||||
</target>
|
||||
|
|
Loading…
Reference in New Issue