LaserGun/ant_build_increment.xml
2020-04-09 18:21:05 +02:00

38 lines
1.2 KiB
XML

<project name="BuildIncrement" default="init" basedir=".">
<description>
simple example increment build variable
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="version" value="0.0"/>
<loadproperties>
<file file="build.number"/>
</loadproperties>
<target name="init">
<echo file="ant_buildversion_init.txt">Changing build version from BUILD_VERSION to ${version}.${build.number} in file plugin.yml...</echo>
<replaceregexp file="${src}/plugin.yml"
match="BUILD_NUMBER"
replace="${version}.${build.number}"
byline="true"
/>
<echo file="ant_buildversion_init.txt">Changed!</echo>
</target>
<target name="end">
<echo file="ant_buildversion_end.txt">Changing back build version ${version}.${build.number} in file plugin.yml to BUILD_VERSION...</echo>
<replaceregexp file="${src}/plugin.yml"
match="${version}.${build.number}"
replace="BUILD_NUMBER"
byline="true"
/>
<buildnumber/>
<echo file="ant_buildversion_init.txt">Changed!</echo>
</target>
</project>