Handle git version differently to fix Eclipse builds.

Unfortunately Eclipse appears to be too dumb to generate the version and
build it correctly (even using an external build step it fails to
rebuild resources afterward), so go back to having a dummy version
checked into the repository. Run git update-index --assume-unchanged on
the file before updating the version, so that git doesn't consider the
file to have changed, instead.
master
Torne (Richard Coles) 2012-10-28 10:10:10 +00:00
parent 9ed7b4fd29
commit c86b65112c
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,5 +2,4 @@ bin
gen
launchpad-*.tar.gz
local.properties
res/values/version.xml
*~

View File

@ -126,6 +126,11 @@
<xpath input="AndroidManifest.xml" expression="/manifest/@android:versionName"
output="manifest.version.name" />
<!-- tell git to ignore changes to the version xml -->
<exec executable="git">
<arg line="update-index --assume-unchanged res/values/version.xml"/>
</exec>
<!-- find out the description of the current Git commit -->
<exec executable="git" outputproperty="git.revision">
<arg line="describe --match 'v[0-9]*' --dirty"/>

4
res/values/version.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="msg_version" translatable="false">ConnectBot (working copy)</string>
</resources>