Skip to content

Commit

Permalink
fail if there are no sync changes to commit instead of committing emp…
Browse files Browse the repository at this point in the history
…ty (vitessio#1666)

Signed-off-by: Andrew Mason <amason@hey.com>
  • Loading branch information
Andrew Mason authored Jan 23, 2024
1 parent d94f32d commit 1000c82
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/sync_cobradocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ git add $(git diff -I"^commit:.*$" --numstat | awk '{print $3}' | xargs) || true
git checkout -- .
# Add any net-new files that were missed in the first `git add`.
git add content/**
git commit --allow-empty -sm "sync cobradocs to latest release branches"

if [ $(git diff --cached --name-only | wc -l) -eq 0 ]; then
echo "No changes to cobradocs detected" >&2
exit 1
fi

git commit -sm "sync cobradocs to latest release branches"

0 comments on commit 1000c82

Please sign in to comment.