Skip to content

Commit

Permalink
Add “git status” and [y/N] step before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mraveux committed Nov 25, 2024
1 parent cbff5f7 commit adc4ced
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit adc4ced

Please sign in to comment.