From b4b81a831532106fb6e71bce83875ef6c90a7fea Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Fri, 27 Feb 2026 19:37:00 +0100 Subject: [PATCH] fix(husky): auto-push current branch to keep synced after version bump --- .husky/pre-push | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index ac23f8d..fe18dcf 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -32,10 +32,14 @@ do echo "✅ Tag $TAG has been updated locally with synced versions." echo "🚀 Auto-pushing updated tag..." - # Push the updated tag directly (using --no-verify to avoid recursion) + # Push the updated branch and tag directly (using --no-verify to avoid recursion) + CURRENT_BRANCH=$(git branch --show-current) + if [ -n "$CURRENT_BRANCH" ]; then + git push origin "$CURRENT_BRANCH" --no-verify + fi git push origin "$TAG" --force --no-verify - echo "✨ Success! The hook synchronized the versions and pushed the updated tag for you." + echo "✨ Success! The hook synchronized the versions, committed to branch, and pushed the updated tag for you." echo "â„šī¸ Note: The original push command was aborted in favor of the auto-push. This is normal." exit 1 # We MUST exit 1 here to stop git from proceeding with the original push which would fail else