16 lines
622 B
Bash
Executable File
16 lines
622 B
Bash
Executable File
#!/usr/bin/env sh
|
|
. "$(dirname -- "$0")/_/husky.sh"
|
|
|
|
# Check if we are pushing a tag
|
|
if echo "$*" | grep -q "refs/tags/v"; then
|
|
echo "🏷️ Tag detected in push, syncing versions..."
|
|
pnpm sync-versions
|
|
|
|
# Stage the changed package.json files
|
|
git add "package.json" "packages/*/package.json" "apps/*/package.json"
|
|
|
|
# Amend the tag if it's on the current commit, but this is complex in pre-push.
|
|
# Better: Just warn the user that they might need to update the tag if package.json changed.
|
|
echo "⚠️ package.json files updated to match tag. Please ensure these changes are part of your tag/commit."
|
|
fi
|