How can I create a Phing build script that will handle deployments, and migrate a project from it's current version to the latest version?
Assuming that I have broken my deployment down into incremental version updates. Let's say my live server is running version 1, and I want to deploy version 3
The build script should update version 1 to version 2 and then from version 2 to version 3.
So the build script could look something like this.
<project name="deploy">
<target name="version1">
<if_version_is_0>
..do update
</if_version_is_0>
</target>
<target name="version2" depends="version1">
<if_version_is_1>
..do update
</if_version_is_1>
</target>
<target name="version3" depends="version2">
<if_version_is_2>
..do update
</if_version_is_2>
</target>
<target name="build" depends="version3"/>
</project>
My problem is with the line
<if_version_is_##>
How can I make a condition based upon the current version of the project?
I did find the VersionTask in the documentation, but it handles version number increasing. I need to read the current version into a property or something like that. How can that be done?