Include link to commit in autopublished changelog

This commit is contained in:
Nassim Jahnke 2023-08-11 16:16:23 +10:00
parent 9ed074d0d5
commit 50176dc317
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ fun Project.latestCommitHash(): String {
return byteOut.toString(Charsets.UTF_8.name()).trim()
}
fun Project.lastCommitMessage(): String {
fun Project.latestCommitMessage(): String {
val byteOut = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "log", "-1", "--pretty=%B")

View File

@ -50,7 +50,7 @@ val suffixedVersion = if (isRelease) baseVersion else baseVersion + "+" + System
val changelogContent = if (isRelease) {
"See [GitHub](https://github.com/ViaVersion/ViaVersion) for release notes."
} else {
rootProject.lastCommitMessage()
"[${rootProject.latestCommitHash()}](https://github.com/ViaVersion/ViaVersion/commit/${rootProject.latestCommitHash()}) ${rootProject.latestCommitMessage()}"
}
val isMainBranch = branch == "master"
modrinth {