aboutsummaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2010-08-21 16:10:38 -0700
committerKenny Root <kenny@the-b.org>2010-08-21 16:10:38 -0700
commitd100aed83a5dac8d04acb07d34c2607e0ab5dd31 (patch)
treed905b3bf66657becad21fd57a006a11fef2e17e4 /build.xml
parentf300fe019837a83711efc6fe525368662bab19ae (diff)
downloadconnectbot-d100aed83a5dac8d04acb07d34c2607e0ab5dd31.tar.gz
connectbot-d100aed83a5dac8d04acb07d34c2607e0ab5dd31.tar.bz2
connectbot-d100aed83a5dac8d04acb07d34c2607e0ab5dd31.zip
Update build.xml for Git
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml24
1 files changed, 8 insertions, 16 deletions
diff --git a/build.xml b/build.xml
index d09b8a7..cf6e295 100644
--- a/build.xml
+++ b/build.xml
@@ -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"