fix(husky): simplify pre-push hook to let native git push modified tag
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m3s
Monorepo Pipeline / 🧹 Lint (push) Successful in 2m54s
Monorepo Pipeline / 🏗️ Build (push) Successful in 2m44s
Monorepo Pipeline / 🐳 Build Image Processor (push) Failing after 28s
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Failing after 35s
Monorepo Pipeline / 🐳 Build Build-Base (push) Successful in 42s
Monorepo Pipeline / 🐳 Build Production Runtime (push) Successful in 36s
Monorepo Pipeline / 🚀 Release (push) Successful in 3m2s

This commit is contained in:
2026-02-27 19:37:30 +01:00
parent fecb5c50ea
commit da28305c2d

View File

@@ -30,21 +30,12 @@ do
git tag -f "$TAG" > /dev/null
echo "✅ Tag $TAG has been updated locally with synced versions."
echo "🚀 Auto-pushing updated tag..."
echo "🚀 Proceeding with push..."
# 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, 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
exit 0
else
echo "✨ Versions already in sync for $TAG."
exit 0 # Allow git to proceed with the original push since we didn't do it ourselves
exit 0
fi
fi
done