From d7cf3006e2be0344880ffd18ad9d235485a6ed62 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Thu, 26 Jun 2014 14:30:26 +0200 Subject: [PATCH] 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 --- modules/openstack_project/files/slave_scripts/merge_tags.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/slave_scripts/merge_tags.sh b/modules/openstack_project/files/slave_scripts/merge_tags.sh index dad31e63dd..b1e22f1649 100755 --- a/modules/openstack_project/files/slave_scripts/merge_tags.sh +++ b/modules/openstack_project/files/slave_scripts/merge_tags.sh @@ -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"