mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-13 01:18:49 +00:00
chore: automate changelog and version commit in pre-push hook
- Enhanced the pre-push hook to automatically stage and commit changes to CHANGELOG.md and Makefile, streamlining the version update process. - Added error handling to ensure the push proceeds even if the commit fails due to no changes.
This commit is contained in:
parent
09c903dd14
commit
a17255e6b4
@ -57,6 +57,18 @@ if [ -f "$CHANGELOG_SCRIPT" ]; then
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}Proceeding with push...${NOCOLOR}"
|
||||
|
||||
# Commit the updated CHANGELOG.md and Makefile
|
||||
echo -e "${CYAN}Staging CHANGELOG.md and Makefile...${NOCOLOR}"
|
||||
git add CHANGELOG.md Makefile
|
||||
|
||||
echo -e "${CYAN}Committing changes...${NOCOLOR}"
|
||||
NEW_VERSION=$(cat "$VERSION_FILE")
|
||||
git commit -m "chore: update changelog and version to $NEW_VERSION" || {
|
||||
# If commit fails (e.g., no changes to commit), continue anyway
|
||||
echo -e "${YELLOW}Note: Could not commit changes (may already be committed)${NOCOLOR}"
|
||||
}
|
||||
|
||||
# Clean up temp files
|
||||
rm -f "$PREVIEW_FILE" "$VERSION_FILE"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user