Fallback to the unreleased change notes when the plugin in current was not released yet

This commit is contained in:
Jakub Chrzanowski
2022-12-05 10:46:26 +01:00
committed by Jakub Chrzanowski
parent 42f6ce7c9e
commit e95cbd35b0
2 changed files with 5 additions and 1 deletions

View File

@@ -87,7 +87,8 @@ tasks {
changeNotes.set(provider {
with(changelog) {
renderItem(
getOrNull(properties("pluginVersion")) ?: getLatest(),
getOrNull(properties("pluginVersion"))
?: runCatching { getLatest() }.getOrElse { getUnreleased() },
Changelog.OutputType.HTML,
)
}