diff options
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 24 |
1 files changed, 8 insertions, 16 deletions
@@ -535,9 +535,11 @@ <echo> have tools/proguard.jar available. See the README.</echo> </target> - <target name="update-version" description="Updates the Version.java file with current SVN revision"> - <echo>Updating resources with SVN revision and build date...</echo> + <target name="update-version" description="Updates the Version.java file with current Git revision"> + <echo>Updating resources with Git revision and build date...</echo> + <property name="revision" value="HEAD"/> + <tstamp> <format property="build.date" pattern="yyyy.MM.dd" /> </tstamp> @@ -547,24 +549,14 @@ output="manifest.version.name" /> <!-- find out svn.revision of HEAD, need svn.exe installed on local machine will en up in property ${Revision} --> - <exec executable="svn" output="svnlog.out"> - <arg line="info -r ${revision}"/> + <exec executable="git" outputproperty="git.revision"> + <arg line="rev-parse --short ${revision}"/> </exec> - <loadproperties srcFile="svnlog.out"> - <filterchain> - <linecontains> - <contains value="Revision"/> - </linecontains> - </filterchain> - </loadproperties> - - <delete file="svnlog.out"/> - <replaceregexp file="${resource.absolute.dir}/values/notrans.xml" encoding="utf8" match='(\x3Cstring name="msg_version">)[^\x3C]*(\x3C/string>)' - replace='\1${ant.project.name} ${manifest.version.name} (r${Revision} ${build.date})\2' /> + replace='\1${ant.project.name} ${manifest.version.name} (r${git.revision} ${build.date})\2' /> - <echo>Updated "msg_version" to: ${ant.project.name} ${manifest.version.name} (r${Revision} ${build.date})</echo> + <echo>Updated "msg_version" to: ${ant.project.name} ${manifest.version.name} (r${git.revision} ${build.date})</echo> </target> <target name="clean" |