Lets get started:
- We will be using the git command "git describe --tags --long" this commands shows us some useful info:
[LATEST_TAG_NAME]-[HOW FAR AM I FROM THAT TAG]-[COMMIT HASH] .
For example - if our last tag was "1.4.3" and I'm currently checked out 23 commits ahead, the output will be: 1.4.3-23-g3s4s3dsf - Another helpful thing we will be using is a trick to turn version name into version code, have a look at Jake Wharton post to see where we got inspired from.
- Open up your build.gradle and set the code: Assumption - this script assumes that your tags don't have a prefix of some kind.
No comments:
Post a Comment