Skip to content

Commit

Permalink
Use long format of changelog for curse
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotori316 committed Oct 1, 2024
1 parent 95d27a2 commit 5ec9edc
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,23 @@ val curseProjectId = "282837"
val modrinthProjectId = "jhxX1zVW"
val releaseDebug: Boolean = (System.getenv("RELEASE_DEBUG") ?: "true").toBoolean()

val modChangelog: Provider<String> = provider {
val fromFile = rootProject.file(project.property("changelog_file")!!).readText()
val shortFormat = fromFile.split(Regex("^# ", RegexOption.MULTILINE), limit = 3)[1]
val commonChangelog =
"""
QuarryPlus(v${project.version}) for Minecraft $minecraft
---
The fabric version includes the binaries of `com.electronwill.night-config:core` and `com.electronwill.night-config:toml`, licensed under [the LGPLv3](https://github.com/TheElectronWill/night-config/blob/v3.7.3/LICENSE).
""".trimIndent() + System.lineSeparator().repeat(2) + shortFormat
""".trimIndent() + System.lineSeparator().repeat(2)

val modChangelog: Provider<String> = provider {
val fromFile = rootProject.file(project.property("changelog_file")!!).readText()
val shortFormat = fromFile.split(Regex("^# ", RegexOption.MULTILINE), limit = 3)[1]
commonChangelog + shortFormat
}

val curseChangelog: Provider<String> = provider {
val fromFile = rootProject.file(project.property("changelog_file")!!).readText()
commonChangelog + fromFile
}

publishMods {
Expand Down Expand Up @@ -68,6 +76,9 @@ publishMods {
slug = "automatic-potato"
}
}
afterEvaluate {
changelog = curseChangelog
}
}
modrinth {
projectId = modrinthProjectId
Expand Down

0 comments on commit 5ec9edc

Please sign in to comment.