From adc4ced8a973888f5040528151fede59f7182b5b Mon Sep 17 00:00:00 2001 From: Mraveux Date: Mon, 25 Nov 2024 15:05:33 -0600 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9Cgit=20status=E2=80=9D=20and=20[y?= =?UTF-8?q?/N]=20step=20before=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/deploy.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 7a04dcdee..b10f581c4 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -245,6 +245,19 @@ echo -e "${CYAN}Copying build files...${NC}" cp -r ../dist/. dist git add dist +# Show git status and ask for confirmation +echo -e "${YELLOW}Current git status:${NC}" +git status + +echo -e "${YELLOW}Please review the changes above. Do you want to proceed with the commit? [y/N]${NC}" +read -n 1 -r +echo # Move to a new line +if [[ ! $REPLY =~ ^[Yy]$ ]] +then + echo -e "${RED}Deployment cancelled.${NC}" + exit 1 +fi + # Commit changes echo -e "${CYAN}Committing changes...${NC}" git commit -m "$(create_message)"