Skip to content

Commit 618a705

Browse files
committed
chore: dynamic version code according to commit number
1 parent e278a9e commit 618a705

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

build.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,20 @@
1111
<arg value="+%Y%m%d"/>
1212
</exec>
1313

14+
<exec executable="git" outputproperty="count">
15+
<arg value="rev-list"/>
16+
<arg value="develop"/>
17+
<arg value="--count"/>
18+
</exec>
19+
20+
<exec executable="expr" outputproperty="code">
21+
<arg value="${count}"/>
22+
<arg value="+"/>
23+
<arg value="20170000"/>
24+
</exec>
25+
1426
<property name="version.name" value="${tag}-${date}" />
15-
<property name="version.code" value="${date}" />
27+
<property name="version.code" value="${code}" />
1628

1729
<!-- The local.properties file is created and updated by the 'android' tool.
1830
It contains the path to the SDK. It should *NOT* be checked into

0 commit comments

Comments
 (0)