You can create a phing script that will find the latest version of your project. And replace the token with the version in each file / selected files.
For example (I used SVN in the example) in a phing script
to get the latest version of svn
<svnlastrevision workingcopy="${path.to.project.dir}" propertyname="svn.lastrevision" />
In your files where you want the svn version, put a marker named @ svn.lastrevision@
the following code will replace this token with the version number
<reflexive> <fileset dir="${dir.to.change.version}"> <include name="**/*.*" /> </fileset> <filterchain> <replacetokens> <token key="svn.lastrevision" value="${svn.lastrevision}" /> </replacetokens> </filterchain> </reflexive>
source share