Author: rwhitcomb Date: Thu Aug 9 13:49:40 2018 New Revision: 1837729 URL: http://svn.apache.org/viewvc?rev=1837729&view=rev Log: PIVOT-1035: Change build number to the "Last Changed Rev" reported by SVN so that: * The contents of the build is traceable to SVN revisions. * The build number does not change unless the build content changes. * The build number increases for every change, and is a "global" value (so that anyone who does a build with the same contents will have the same build number).
Modified: pivot/trunk/build.xml Modified: pivot/trunk/build.xml URL: http://svn.apache.org/viewvc/pivot/trunk/build.xml?rev=1837729&r1=1837728&r2=1837729&view=diff ============================================================================== --- pivot/trunk/build.xml (original) +++ pivot/trunk/build.xml Thu Aug 9 13:49:40 2018 @@ -66,10 +66,23 @@ limitations under the License. <!-- Dynamic properties --> <property file="build.properties"/> <property name="release" value="apache-${ant.project.name}-${version}"/> + <exec executable="svn" dir="." output="svnlog"> + <arg value="info"/> + </exec> + <loadproperties srcFile="svnlog"> + <filterchain> + <linecontains> + <contains value="Last Changed Rev:"/> + </linecontains> + <replacestring from="Last Changed Rev:" to="lastchangedrev="/> + </filterchain> + </loadproperties> + <echo message="Last Changed Revision: ${lastchangedrev}"/> <propertyfile file="build.number" comment="## Auto generated build number. DO NOT MODIFY!"> - <entry key="build.number" type="date" operation="=" value="now" pattern="YYYYDDDHHmm"/> + <entry key="build.number" type="string" operation="=" value="${lastchangedrev}"/> </propertyfile> <property file="build.number"/> + <echo message="Build Number: ${build.number}"/> <!-- Compiler properties and Test properties have been moved into build.properties -->