From 5992b28eb543843d5eddefac2fa86128488ade66 Mon Sep 17 00:00:00 2001 From: Jp Date: Thu, 26 Feb 2026 11:30:32 +0800 Subject: [PATCH] ci: use rm -f to avoid errors when cleaning up temporary files The -f flag prevents errors if the files do not exist, ensuring the cleanup step is robust and does not fail the deployment process. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8d00ab5..b068ecc 100644 --- a/Makefile +++ b/Makefile @@ -27,8 +27,8 @@ deploy-server: @cat k8s/deployment.yaml >> /tmp/server_deploy.yaml @# Single SCP/SSH call to reduce password prompts scp /tmp/server_deploy.yaml $(SERVER_USER)@$(SERVER_IP):/tmp/server_deploy.yaml - ssh $(SERVER_USER)@$(SERVER_IP) "sudo kubectl apply -f /tmp/server_deploy.yaml && rm /tmp/server_deploy.yaml" - @rm /tmp/server_deploy.yaml + ssh $(SERVER_USER)@$(SERVER_IP) "sudo kubectl apply -f /tmp/server_deploy.yaml && rm -f /tmp/server_deploy.yaml" + @rm -f /tmp/server_deploy.yaml stop: -podman kube down k8s/deployment.yaml >/dev/null 2>&1