From 75c58a5891e823600af435d6a9b3b603c0567ede Mon Sep 17 00:00:00 2001 From: Chimbori Date: Fri, 28 Jun 2024 09:42:04 -0700 Subject: [PATCH] Handle release track names containing a colon (#1134) Co-authored-by: manas@chimbori.com --- .../internal/workers/PublishArtifactWorkerBase.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/tasks/internal/workers/PublishArtifactWorkerBase.kt b/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/tasks/internal/workers/PublishArtifactWorkerBase.kt index a59be954..4482262e 100644 --- a/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/tasks/internal/workers/PublishArtifactWorkerBase.kt +++ b/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/tasks/internal/workers/PublishArtifactWorkerBase.kt @@ -22,10 +22,10 @@ internal abstract class PublishArtifactWorkerBase { val locales = parameters.releaseNotesDir.orNull?.asFile?.listFiles().orEmpty() return locales.mapNotNull { locale -> - var result = File(locale, "$track.txt").orNull() - if (result == null) result = File(locale, RELEASE_NOTES_DEFAULT_NAME).orNull() - result + File(locale, "${track.replace(':', '-')}.txt").orNull() + ?: File(locale, "${track.substringAfter(':')}.txt").orNull() + ?: File(locale, RELEASE_NOTES_DEFAULT_NAME).orNull() }.associate { notes -> notes.parentFile.name to notes.readProcessed() }.toSortedMap()