Skip to content

Instantly share code, notes, and snippets.

@seanhagen
Created November 12, 2013 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanhagen/7437875 to your computer and use it in GitHub Desktop.
Save seanhagen/7437875 to your computer and use it in GitHub Desktop.
Small Phing target to update a file with the current build version. Requires 'version' to be set in project.properties
<target name="-set.buildtime">
<php expression="date('Ymdhms');" returnProperty="build_time" />
<property name="build.version" value="${version}-${build_time}" />
<echo>Build number: ${build.version}</echo>
<delete file="${phing.dir}/build.txt" />
<echo file="${phing.dir}/build.txt">${build.version}</echo>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment