Created
November 12, 2013 20:15
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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