From c36bf4a3c143707504176d9fb0779159a59d43b6 Mon Sep 17 00:00:00 2001 From: Piotr Adamczyk Date: Fri, 1 Jan 2021 12:13:37 +0100 Subject: [PATCH] fix tests --- .../kotlin/flank/scripts/ci/nexttag/NextReleaseTagGenerator.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flank-scripts/src/main/kotlin/flank/scripts/ci/nexttag/NextReleaseTagGenerator.kt b/flank-scripts/src/main/kotlin/flank/scripts/ci/nexttag/NextReleaseTagGenerator.kt index 93c04ebb01..230f03ca21 100644 --- a/flank-scripts/src/main/kotlin/flank/scripts/ci/nexttag/NextReleaseTagGenerator.kt +++ b/flank-scripts/src/main/kotlin/flank/scripts/ci/nexttag/NextReleaseTagGenerator.kt @@ -1,7 +1,6 @@ package flank.scripts.ci.nexttag import java.time.LocalDate -import java.time.Year import java.time.format.DateTimeFormatter fun generateNextReleaseTag(previousReleaseTag: String): String { @@ -14,7 +13,7 @@ fun generateNextReleaseTag(previousReleaseTag: String): String { } private fun isNextReleaseInCurrentMonth(year: String, month: String) = - DateTimeFormatter.ofPattern("yy").format(Year.now()) == year && + DateTimeFormatter.ofPattern("yy").format(LocalDate.now()) == year && DateTimeFormatter.ofPattern("MM").format(LocalDate.now()) == month private fun currentMonthFirstTag() = "v${DateTimeFormatter.ofPattern("yy.MM").format(LocalDate.now())}.0"