use send-announcements-to metadata for deliverables
Pull send-announcements-to out of the deliverable file and put it into the commit message for the new tag. Then when generating the announcement, look for the metadata value and use it if found. Change-Id: I8fac9f33973df07f6d716fab09fe51381f07b504 Depends-On: I41f3f4874464b37ff95ec1e41a0b6993b62dcf1d
This commit is contained in:
parent
712d9082c6
commit
02d34c2d21
|
@ -94,6 +94,13 @@ function get_tag_meta {
|
|||
# The series name is part of the commit message left by release.sh.
|
||||
SERIES=$(get_tag_meta series)
|
||||
|
||||
# The recipient for announcements is part of the commit message left
|
||||
# by release.sh.
|
||||
ANNOUNCE=$(get_tag_meta announce)
|
||||
if [[ ! -z "$ANNOUNCE" ]]; then
|
||||
email_to="--email-to $ANNOUNCE"
|
||||
fi
|
||||
|
||||
# Figure out if that series is a stable branch or not.
|
||||
if git branch -a | grep -q origin/stable/$SERIES; then
|
||||
stable="--stable"
|
||||
|
@ -111,6 +118,7 @@ relnotes_file="$RELNOTESDIR/$SHORTNAME-$VERSION"
|
|||
|
||||
release-notes \
|
||||
--email \
|
||||
$email_to \
|
||||
$email_tags \
|
||||
--series $SERIES \
|
||||
$stable \
|
||||
|
|
|
@ -24,9 +24,9 @@ TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||
source $TOOLSDIR/functions
|
||||
|
||||
function usage {
|
||||
echo "Usage: release.sh [-a] repository series version SHA"
|
||||
echo "Usage: release.sh [-a] repository series version SHA announce"
|
||||
echo
|
||||
echo "Example: release.sh openstack/oslo.rootwrap mitaka 3.0.3 gerrit/master"
|
||||
echo "Example: release.sh openstack/oslo.rootwrap mitaka 3.0.3 gerrit/master openstack-dev@lists.openstack.org"
|
||||
}
|
||||
|
||||
announce=false
|
||||
|
@ -40,7 +40,7 @@ while getopts "a" opt "$@"; do
|
|||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ $# -lt 4 ]; then
|
||||
if [ $# -lt 5 ]; then
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
|
@ -49,6 +49,7 @@ REPO=$1
|
|||
SERIES=$2
|
||||
VERSION=$3
|
||||
SHA=$4
|
||||
ANNOUNCE=$5
|
||||
|
||||
SHORTNAME=`basename $REPO`
|
||||
|
||||
|
@ -87,6 +88,7 @@ else
|
|||
meta:version: $VERSION
|
||||
meta:series: $SERIES
|
||||
meta:release-type: $RELEASETYPE
|
||||
meta:announce: $ANNOUNCE
|
||||
"
|
||||
echo "Tag message is '$TAGMSG'"
|
||||
git tag -m "$TAGMSG" -s "$VERSION" $TARGETSHA
|
||||
|
|
|
@ -57,8 +57,9 @@ if [[ -z "$VIRTUAL_ENV" ]]; then
|
|||
fi
|
||||
|
||||
list-deliverable-changes -r $RELEASES_REPO $DELIVERABLES \
|
||||
| while read deliverable series version repo hash; do
|
||||
$TOOLSDIR/release.sh $announce $repo $series $version $hash
|
||||
| while read deliverable series version repo hash announce_to; do
|
||||
title "$repo $series $version $hash $announce_to"
|
||||
$TOOLSDIR/release.sh $announce $repo $series $version $hash $announce_to
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -40,9 +40,8 @@ def main():
|
|||
args.releases_repo,
|
||||
args.deliverable_file,
|
||||
)
|
||||
for deliverable_name, series_name, version, repo, hash in results:
|
||||
print('%s %s %s %s %s' %
|
||||
(deliverable_name, series_name, version, repo, hash))
|
||||
for r in results:
|
||||
print(' '.join(r))
|
||||
return 0
|
||||
|
||||
|
||||
|
|
|
@ -52,6 +52,14 @@ def get_modified_deliverable_file_content(reporoot, filenames):
|
|||
with open(filename, 'r') as f:
|
||||
deliverable_data = yaml.load(f.read())
|
||||
|
||||
# Determine where to send email announcements of
|
||||
# releases. Default to the development list, to cut down on
|
||||
# excessive emails to the announcement list.
|
||||
send_announcements_to = deliverable_data.get(
|
||||
'send-announcements-to',
|
||||
'openstack-dev@lists.openstack.org',
|
||||
)
|
||||
|
||||
# The series name is part of the filename, rather than the file
|
||||
# body. That causes release.sh to be called with series="_independent"
|
||||
# for release:independent projects, and release.sh to use master branch
|
||||
|
@ -68,4 +76,5 @@ def get_modified_deliverable_file_content(reporoot, filenames):
|
|||
this_version = all_versions[version]
|
||||
for project in this_version['projects']:
|
||||
yield (deliverable_name, series_name, version,
|
||||
project['repo'], project['hash'])
|
||||
project['repo'], project['hash'],
|
||||
send_announcements_to)
|
||||
|
|
Loading…
Reference in New Issue