I hereby claim:
- I am numan1617 on github.
- I am numan1617 (https://keybase.io/numan1617) on keybase.
- I have a public key whose fingerprint is 27A3 5F1E F5A2 5A03 D933 E683 98DD BC21 B8C2 739E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Use last tag as the base for the version. E.g. tag initial commit as 0.0 | |
| LAST_TAG_VERSION=`git describe --tags | cut -f1 -d"-"` | |
| # Optional. Same as above but keeps the commit hash | |
| #LAST_TAG_VERSION=`git describe --tags` | |
| # Total number of commits in the repository | |
| TOTAL_COMMITS=`git rev-list HEAD --count` | |
| # Write the version numbers to the compiled product |
| def getVersionCode = { -> | |
| try { | |
| def code = new ByteArrayOutputStream() | |
| exec { | |
| commandLine 'git', 'rev-list', 'HEAD', '--count' | |
| standardOutput = code | |
| } | |
| return code.toString().toInteger() | |
| } | |
| catch (ignored) { |