Skip to content

Commit f81935b

Browse files
committed
add buildsrc commit count to version numbering
1 parent 3d97887 commit f81935b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

buildSrc/src/main/kotlin/common.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ val commitCountExec = providers.exec {
2323
executable("git")
2424
args("rev-list", "--count", "HEAD", projectDir.absolutePath)
2525
}
26-
val commitCount = commitCountExec.standardOutput.asText.get().trim().toInt()
26+
val buildSrcCommitCountExec = providers.exec {
27+
executable("git")
28+
args("rev-list", "--count", "HEAD", rootProject.file("buildSrc").absolutePath)
29+
}
30+
31+
val commitCount = commitCountExec.standardOutput.asText.get().trim().toInt() + buildSrcCommitCountExec.standardOutput.asText.get().trim().toInt()
2732

2833
val commitHashExec = providers.exec {
2934
executable("git")

0 commit comments

Comments
 (0)