Add proposed/* branches support to merge_tags.sh

Rather than trying to merge tags only if the tag appears to be pushed on
milestone-proposed, merge tags only if the tag appears to not be pushed
on a stable branch. This allows to support pre-release branches named
"proposed/foo" instead of just "milestone-proposed".

Also avoids exiting with a noisy "malformed object name" error in the
case there was no milestone-proposed branch (which was the case when the
script is called on a stable branch release).

Change-Id: Idbf3b25d1575de1698ed8cfdc1b74e3484391f27
This commit is contained in:
Thierry Carrez 2014-06-26 14:30:26 +02:00
parent e6aa5d9f44
commit d7cf3006e2

View File

@ -14,8 +14,11 @@
TAG=$1
if $(git tag --contains origin/milestone-proposed | grep "^$TAG$" >/dev/null)
# Only merge release tag if it's not on a stable branch
if $(git branch -r --contains "$TAG" | grep "stable/" >/dev/null)
then
echo "Tag $TAG was pushed to a stable branch, ignoring."
else
git config user.name "OpenStack Proposal Bot"
git config user.email "openstack-infra@lists.openstack.org"
git config gitreview.username "proposal-bot"