From 954b62096d16ad84b194ca368388e510708af30b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <git@minelli.swiss>
Date: Thu, 27 Mar 2025 14:20:16 +0100
Subject: [PATCH] CI/CD => Delete the release before recreate it

---
 NodeApp/.gitlab-ci/01_functions.yml | 4 ++++
 NodeApp/.idea/vcs.xml               | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/NodeApp/.gitlab-ci/01_functions.yml b/NodeApp/.gitlab-ci/01_functions.yml
index f3ca0ff..3c65d68 100644
--- a/NodeApp/.gitlab-ci/01_functions.yml
+++ b/NodeApp/.gitlab-ci/01_functions.yml
@@ -207,6 +207,10 @@
                     ]                       
                 }
             }')
+        - >
+            curl --header "Content-Type: application/json" \
+              --header "JOB-TOKEN: $CI_JOB_TOKEN" \
+              --request DELETE "${GITLAB_API_PROJECT_URL}/releases/${tag_name}"
         - >
             curl --data "${RELEASE_DATA}" \
               --header "Content-Type: application/json" \
diff --git a/NodeApp/.idea/vcs.xml b/NodeApp/.idea/vcs.xml
index 073c3af..d86e73b 100644
--- a/NodeApp/.idea/vcs.xml
+++ b/NodeApp/.idea/vcs.xml
@@ -2,7 +2,6 @@
 <project version="4">
   <component name="VcsDirectoryMappings">
     <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
-    <mapping directory="$PROJECT_DIR$/DojoExercise_c_hello_world" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/src/shared" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/src/sharedByClients" vcs="Git" />
   </component>
-- 
GitLab