Fix a few small things with eol_branch

- exit on error
- Appropriately escape EOL message
- push full branch ref to avoid namespace conflicts (eg tags)

Change-Id: I321392e228a6990d7b903b2dd2f40a2b369ed526
This commit is contained in:
Joshua Hesketh 2017-07-18 22:22:07 +10:00
parent 17c9220d7f
commit 3f0acc3919
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
function print_help {
echo ""
@ -92,7 +92,7 @@ function abandon_reviews {
if [ $VERBOSE = true ]; then
echo "Found commit $rev to abandon"
fi
$DEBUG ssh -p 29418 review.openstack.org gerrit review --project $project --abandon --message '"$EOL_MESSAGE"' $rev
$DEBUG ssh -p 29418 review.openstack.org gerrit review --project $project --abandon --message \"$EOL_MESSAGE\" $rev
done
}
@ -122,7 +122,7 @@ function delete_branch {
if [ $VERBOSE = true ]; then
echo "About to delete the branch $BRANCH from $project (rev $rev)"
fi
$DEBUG git push $REMOTE --delete $BRANCH
$DEBUG git push $REMOTE --delete refs/heads/$BRANCH
}