Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 31 lines (27 sloc) 0.844 kB
806e49c Add svn revision to version number
jeremywadsack authored
1 <project default="svn-revision">
2 <target name="svn-revision">
3 <property name="revision" value="HEAD"/>
4
5 <!--
6 Exec `svn info` to get the revision of the code being built.
7 Note that the output of this command is in "name: value" format
8 so we can pretend it's a java properties file.
9 -->
10 <exec executable="svn" output="svn-info.properties">
11 <arg line="info"/>
12 </exec>
13 <property prefix="svn" file="svn-info.properties"/>
14 <echo>Revision: ${svn.Revision}</echo>
15
16 <!--
17 Write the revision number into the Manifest as the last
18 segment of the VersionName property
19 -->
20 <replaceregexp file="AndroidManifest.xml"
21 match='android:versionName="([^".]+\.[^".]+)(\.[^"]*)?"'
22 replace='android:versionName="\1.${svn.Revision}"'
23 />
24
25 <!--
26 Clean up
27 -->
28 <delete file="svn-info.properties"/>
29 </target>
30 </project>
Something went wrong with that request. Please try again.