From 13121d0d60fc95c968dbd80d3c5f6a1b3bd580e1 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Wed, 27 Jul 2016 15:36:06 -0500 Subject: [PATCH] Update the UPPER_CONSTRAINTS_FILE url to include the new branch The danger here is that if the branch doesn't exisit and the review merges the new branch or $project will be unconstrained and therefore testing is somewhat voided. We need to manage that externally to this process Change-Id: Iae6aefefcd6b7e96d15bd5d373ae439e4fe80daf --- functions | 19 +++++++++++++++++++ make_stable_branch.sh | 1 + 2 files changed, 20 insertions(+) diff --git a/functions b/functions index fb39031..9937e33 100644 --- a/functions +++ b/functions @@ -82,6 +82,25 @@ defaultbranch=$branch" } +function update_upper_constraints { + typeset branch="$1" + typeset uc_server='git.openstack.org' + typeset uc_path='cgit/openstack/requirements/plain/upper-constraints.txt' + typeset uc_url="https://${uc_server}/${uc_path}?h=${branch}" + + title "Updating tox.ini for upper-constraints" + git checkout $branch + sed -i~ -e "s,-c.*{\(env:UPPER_CONSTRAINTS_FILE\)[^ ]*} ,-c{\1:$uc_url}," tox.ini + if ! git diff --exit-code >/dev/null 2>&1 ; then + git add tox.ini + git commit -m "Update UPPER_CONSTRAINTS_FILE for $branch" + git show + local shortbranch=$(basename $branch) + git review -t "create-${shortbranch}" + fi +} + + function clone_repo { typeset repo="$1" typeset branch="$2" diff --git a/make_stable_branch.sh b/make_stable_branch.sh index 23e7f58..0835153 100755 --- a/make_stable_branch.sh +++ b/make_stable_branch.sh @@ -55,6 +55,7 @@ REALSHA=`git show-ref -s $NEW_BRANCH` git push gerrit $NEW_BRANCH update_gitreview "$NEW_BRANCH" +update_upper_constraints "$NEW_BRANCH" if [[ -d releasenotes/source ]]; then # Also update the reno settings, in master title "Updating reno"