From 4686a10f415f719ef69470c93b885ca2c8bac7b7 Mon Sep 17 00:00:00 2001 From: foefl Date: Wed, 7 Jan 2026 10:47:43 +0100 Subject: [PATCH] include deletion of old artifacts in build script --- scripts/build.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 6c06222..535c39c 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -4,6 +4,16 @@ $PY_PATH = Join-Path -Path $ENV_PATH -ChildPath 'python' $SRC_PATH = (Get-Location).Path Write-Output "Build Pipeline for d-opt EKF-Diagnostics sensor anomaly detection" + +Write-Output "Delete existing artifacts..." +$pattern = "dopt_ekf_sensor-anomalies_v*" +Get-ChildItem -Path $DEPLOYMENT_PATH -Filter $pattern | Remove-Item -Recurse -Force +if ($? -eq $false){ + Write-Output "[PWSH] Exiting script because there were errors in the deletion procedure" + Exit +} +Write-Output "Deleted outstanding artifacts successfully" + Write-Output "Building package..." .\scripts\publish.ps1 if ($? -eq $false){