pit/build-common-versioning.xml
Jonathan Bernard f3f30237b2 Reorganizing into subprojects.
libpit      - Personal Issue Tracker core libraries (Filter, Issue, Project, Category)
pit-cli     - Command Line Interface (CLI) to libpit
pit-swing   - Graphical, Swing interface to libpit (built using Griffon)

libpit and pit-swing both build, though pit-swing is just an empty griffon poject.
2010-02-13 11:58:00 -06:00

30 lines
1.2 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<project name="Common Build Versioning" >
<property name="cbv-basedir" value="${basedir}" />
<property name="cbv-property-file" value="project.properties"/>
<target name="-cbv-init">
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
<target name="-pre-set-version" />
<target name="-do-set-version">
<input message="Current version is ${application.version}. Enter new version: " addproperty="new-version"/>
<propertyfile file="${cbv-basedir}/${cbv-property-file}">
<entry key="application.version" value="${new-version}" />
<entry key="build.number" value="0" />
</propertyfile>
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
<target name="-post-set-version" />
<target name="set-version" depends="-cbv-init,-pre-set-version,-do-set-version,-post-set-version"/>
<target name="increment-build-number">
<propertyfile file="${cbv-basedir}/${cbv-property-file}">
<entry key="build.number" operation="+" type="int" default="0"/>
</propertyfile>
<property file="${cbv-basedir}/${cbv-property-file}" />
</target>
</project>