buildSrc: Use HEAD rev count as version code
In Actions, we do not always have a checkout of the master branch. This only applies to release builds anyway. For debug builds, we always use the timestamp.
This commit is contained in:
parent
ca0085e147
commit
8ee3c53492
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ val Project.gitVersionCode: Int
|
|||
try {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine("git", "rev-list", "--first-parent", "--count", "master")
|
||||
commandLine("git", "rev-list", "--first-parent", "--count", "HEAD")
|
||||
standardOutput = stdout
|
||||
}
|
||||
stdout.toString("utf-8").trim('\n').toInt()
|
||||
|
|
Loading…
Reference in a new issue