[relmgt] Update reno when cutting unmaintained branch
When we cut unmaintained/<series> branch, the <series>.rst reno page needs to be updated to use unmaintained/<series> branch instead of stable/<series> branch, as that is deleted. Change-Id: I811d13d4d524ae83e14acbe8e16888c7f1d91e57
This commit is contained in:
parent
e8b2c5a388
commit
b857857055
roles/copy-release-tools-scripts/files/release-tools
45
roles/copy-release-tools-scripts/files/release-tools/change_reno_branch_to_unmaintained.sh
Executable file
45
roles/copy-release-tools-scripts/files/release-tools/change_reno_branch_to_unmaintained.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script to update release notes in a repository when a stable/<series>
|
||||
# branch transitions to unmaintained.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Usage: $0 series repo_dir"
|
||||
echo
|
||||
echo "Example: $0 kilo openstack/oslo.config"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
SERIES=$1
|
||||
REPO=$2
|
||||
|
||||
cd $REPO
|
||||
|
||||
commit_msg="reno: Update master for unmaintained/${SERIES}
|
||||
|
||||
Update the ${SERIES} release notes configuration to build from
|
||||
unmaintained/${SERIES}.
|
||||
"
|
||||
|
||||
sed --in-place -e "s/stable\/${SERIES}/unmaintained\/${SERIES}/" releasenotes/source/${SERIES}.rst
|
||||
git add releasenotes/source/${SERIES}.rst
|
||||
git diff
|
||||
git commit -m "$commit_msg"
|
||||
git show
|
||||
git review -t "reno-eom-${SERIES}" --yes
|
@ -97,3 +97,14 @@ if [[ $NEW_BRANCH =~ stable/ ]]; then
|
||||
echo "$REPO does not use reno, no update needed"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $NEW_BRANCH =~ unmaintained/ ]]; then
|
||||
series=$(echo $NEW_BRANCH | cut -f2 -d/)
|
||||
if [[ -d releasenotes/source ]]; then
|
||||
echo "Updating reno to use unmaintained/$series"
|
||||
git checkout master
|
||||
$TOOLSDIR/change_reno_branch_to_unmaintained.sh $series .
|
||||
else
|
||||
echo "$REPO does not use reno, no update needed"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user