Use "git describe" because it supplies both the commit ID as well as the number of commits since the last release.

This commit is contained in:
Udi Finkelstein 2015-07-09 21:56:14 +03:00
parent 184ac34500
commit 49759dd35c
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ task filterAbout {
into 'src/main/assets'
filter(ReplaceTokens, tokens: [versionname: android.defaultConfig.versionName,
versioncode: android.defaultConfig.versionCode.toString(),
commit: "git rev-parse HEAD".execute().text[0..6]])
commit: "git describe".execute().text])
}
}