From 6e2bb7df7a39f9e5267a3c1bead32898110672ab Mon Sep 17 00:00:00 2001 From: Beppe Catanese Date: Tue, 12 Nov 2024 13:13:54 +0100 Subject: [PATCH] Drop content except webhook_handler.go --- go/build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go/build.gradle b/go/build.gradle index 640afea..b9bf669 100644 --- a/go/build.gradle +++ b/go/build.gradle @@ -90,7 +90,12 @@ services.findAll { it.name.endsWith('Webhooks') }.each { Service svc -> tasks.named("generate${svc.name}", GenerateTask) { packageName.set(singular) } tasks.named("deploy${svc.name}", Copy) { def targetDir = layout.projectDirectory.dir("repo/src/${singular}") - delete targetDir // Drop content first + // Drop content first (except webhook_handler.go) + targetDir.asFile.listFiles().each { file -> + if (file.name != 'webhook_handler.go') { + file.delete() + } + } into targetDir // Copy models } }