From cf511a99b92030fd47f1698e19e622af5f9d907e Mon Sep 17 00:00:00 2001 From: Pawel Pasterz Date: Tue, 12 Jan 2021 05:39:52 +0100 Subject: [PATCH] Fix incorrecg method usage on master --- flank-scripts/build.gradle.kts | 2 +- .../flank/scripts/github/commons/LastWorkflowRunDate.kt | 2 +- test_runner/src/main/kotlin/ftl/run/common/SaveSessionId.kt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flank-scripts/build.gradle.kts b/flank-scripts/build.gradle.kts index f198f3653b..bdb37b192b 100644 --- a/flank-scripts/build.gradle.kts +++ b/flank-scripts/build.gradle.kts @@ -28,7 +28,7 @@ shadowJar.apply { } } // .. -version = "1.4.0" +version = "1.4.1" group = "com.github.flank" application { diff --git a/flank-scripts/src/main/kotlin/flank/scripts/github/commons/LastWorkflowRunDate.kt b/flank-scripts/src/main/kotlin/flank/scripts/github/commons/LastWorkflowRunDate.kt index cf1c5d6030..679b2cd361 100644 --- a/flank-scripts/src/main/kotlin/flank/scripts/github/commons/LastWorkflowRunDate.kt +++ b/flank-scripts/src/main/kotlin/flank/scripts/github/commons/LastWorkflowRunDate.kt @@ -24,7 +24,7 @@ suspend fun getLastWorkflowRunDate( workflowRuns .filter { it.status != "in_progress" } .filter { it.conclusion != "cancelled" } - .getOrNull(0) + .getOrNull(1) .logRun() ?.createdAt.run { DateTimeFormatter.ISO_INSTANT.format(Instant.parse(this)) } } ?: run { diff --git a/test_runner/src/main/kotlin/ftl/run/common/SaveSessionId.kt b/test_runner/src/main/kotlin/ftl/run/common/SaveSessionId.kt index 6de279c709..4f278a5bd3 100644 --- a/test_runner/src/main/kotlin/ftl/run/common/SaveSessionId.kt +++ b/test_runner/src/main/kotlin/ftl/run/common/SaveSessionId.kt @@ -2,8 +2,8 @@ package ftl.run.common import ftl.args.IArgs import ftl.util.sessionId -import java.nio.file.Path +import java.nio.file.Paths const val SESSION_ID_FILE = "session_id.txt" -fun IArgs.saveSessionId() = Path.of(localResultDir, SESSION_ID_FILE).toFile().writeText(sessionId) +fun IArgs.saveSessionId() = Paths.get(localResultDir, SESSION_ID_FILE).toFile().writeText(sessionId)