Cleanup turbo repo caches

Cleanup turbo repo caches if a `clean` build is triggered since this is the expected behaviour.

Committed-by: Thomas Zerr <thomas.zerr@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2023-08-29 16:39:09 +02:00
parent 9dc86ff11e
commit 017aee2023

View File

@@ -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()) {