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:
parent
184ac34500
commit
49759dd35c
|
@ -122,7 +122,7 @@ task filterAbout {
|
||||||
into 'src/main/assets'
|
into 'src/main/assets'
|
||||||
filter(ReplaceTokens, tokens: [versionname: android.defaultConfig.versionName,
|
filter(ReplaceTokens, tokens: [versionname: android.defaultConfig.versionName,
|
||||||
versioncode: android.defaultConfig.versionCode.toString(),
|
versioncode: android.defaultConfig.versionCode.toString(),
|
||||||
commit: "git rev-parse HEAD".execute().text[0..6]])
|
commit: "git describe".execute().text])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue