From 017aee20234cd85ff6672b27110ae4f00b346ee2 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Tue, 29 Aug 2023 16:39:09 +0200 Subject: [PATCH] Cleanup turbo repo caches Cleanup turbo repo caches if a `clean` build is triggered since this is the expected behaviour. Committed-by: Thomas Zerr --- scm-ui/build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scm-ui/build.gradle b/scm-ui/build.gradle index 783b78b9c7..5d3b1e2f3a 100644 --- a/scm-ui/build.gradle +++ b/scm-ui/build.gradle @@ -136,7 +136,7 @@ yarn_install { } task build { - dependsOn 'check', 'bundle' + dependsOn 'check', 'bundle', 'cleanTurboRepo' } task bundle(type: YarnTask) { @@ -202,6 +202,14 @@ task publish(type: YarnTask) { dependsOn 'yarn_install' } +task cleanTurboRepo(type: YarnTask) { + doFirst { + if (project.gradle.startParameter.taskNames.contains "clean") { + args = ['turbo', 'run', 'build', '--force'] + } + } +} + task cleanUpAfterPublishing { doLast { if (npmrc.exists()) {