From 266b6a45f64ed92874884460d5c121d8cac25b8f Mon Sep 17 00:00:00 2001 From: Souptik Datta Date: Sun, 1 Dec 2024 12:02:34 +0530 Subject: [PATCH] fix: Fix hostinger deployment pipeline Signed-off-by: Souptik Datta --- .bin/deploy-hostinger.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.bin/deploy-hostinger.sh b/.bin/deploy-hostinger.sh index 39c5cfda..d3668f39 100644 --- a/.bin/deploy-hostinger.sh +++ b/.bin/deploy-hostinger.sh @@ -13,15 +13,14 @@ git checkout $BUILT_BRANCH || git checkout -b $BUILT_BRANCH mkdir $HOME/hostinger-backup # Backup the required three folders. -cp -r ./.git $HOME/hostinger-backup cp -r ./backend/plugins $HOME/hostinger-backup cp -r ./backend/themes $HOME/hostinger-backup -# Clean up the entire directory. -rm -rf * - -# Copy Git folder. -cp -r $HOME/hostinger-backup/.git . +# Clean up the entire directory, except .git. +for dir in ./*; do + [ "$dir" = ".git" ] && continue + rm -rf "$dir" +done # Copy Plugins cp -r $HOME/hostinger-backup/plugins .