Skip to content

Commit

Permalink
chore: dynamic version code according to commit number
Browse files Browse the repository at this point in the history
  • Loading branch information
osfans committed Jan 4, 2017
1 parent e278a9e commit 618a705
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@
<arg value="+%Y%m%d"/>
</exec>

<exec executable="git" outputproperty="count">
<arg value="rev-list"/>
<arg value="develop"/>
<arg value="--count"/>
</exec>

<exec executable="expr" outputproperty="code">
<arg value="${count}"/>
<arg value="+"/>
<arg value="20170000"/>
</exec>

<property name="version.name" value="${tag}-${date}" />
<property name="version.code" value="${date}" />
<property name="version.code" value="${code}" />

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

0 comments on commit 618a705

Please sign in to comment.