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"