This commit is contained in:
1820982382
2026-08-03 22:29:47 +08:00
parent 87b94d8aac
commit bb6e4b9446
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -72,3 +72,11 @@ processResources {
}
jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
// 获取git提交总数
def gitCommitCount = providers.exec {
commandLine 'git', 'rev-list', '--count', 'HEAD'
}.standardOutput.asText.map { it.trim() }
// 最终完整版本 = 主版本+构建号
version = "${mod_version}.${gitCommitCount.get()}-alpha"