You might need to create your own task for this. The task may look something like...
<?php
require_once "phing/Task.php";
class VersionNumberTask extends Task
{
private $versionprop;
public function setVersionProp($versionprop)
{
$this->versionprop = $versionprop;
}
public function init()
{
}
public function main()
{
// read the version text file in to a variable
$version = file_get_contents("version.txt");
$this->project->setProperty($this->versionprop, $version);
}
}
Then you would define the task in your build xml
<taskdef classname="VersionNumberTask" name="versiontask" />
Then call the task
<target name="dist">
<versiontask versionprop="version.number"/>
</target>
At this point, you should be able to access the version number using ${version.number} throughout your build xml.
Hope this helps!