mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-22 03:02:35 +00:00
Fix remote sync check in release trigger script
- Replace unreliable git fetch --dry-run check - Use git rev-parse to compare local and remote commits - Prevents false warnings about diverged branches
This commit is contained in:
parent
0739b3ade1
commit
e822ab7ae1
1 changed files with 7 additions and 2 deletions
|
|
@ -61,8 +61,13 @@ else
|
|||
fi
|
||||
|
||||
# Check 4: Up to date with remote
|
||||
if ! git fetch origin --dry-run 2>&1 | grep -q "up to date"; then
|
||||
echo "⚠️ Warning: Remote has updates or local branch is ahead"
|
||||
git fetch origin --quiet
|
||||
LOCAL=$(git rev-parse @)
|
||||
REMOTE=$(git rev-parse @{u})
|
||||
|
||||
if [ "$LOCAL" != "$REMOTE" ]; then
|
||||
echo "⚠️ Warning: Local and remote branches have diverged"
|
||||
git status -sb
|
||||
echo ""
|
||||
read -p "Continue anyway? [y/N] " -n 1 -r
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue