add info about used commit to sentry reports

This commit is contained in:
Julian Krings committed 2025-07-23 15:07:06 +02:00
1 parent 3949468a60
commit e5f2fee926
3 files changed
+17

No files matched your search

+8
View File
@@ -137,6 +137,14 @@ tasks {
"version" to rootProject.version,
"apiVersion" to apiVersion,
"main" to main,
"environment" to if (project.hasProperty("release")) "production" else "development",
"commit" to provider {
ProcessBuilder("git", "rev-parse", "HEAD")
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.start()
.inputStream.bufferedReader().readText().trim()
.takeIf { it.length == 40 } ?: "unknown"
}
)
filesMatching("**/plugin.yml") {
expand(inputs.properties)