releases/tools/list_changes_unreleased_deliverables.sh
Sean McGinnis 1aa9607e0a
Fix bashate errors
A few errors were causing the bashate job to fail. This corrects those
errors and also addresses the reported warnings for a clean build.

Change-Id: Ibc5c4f006d264e2f0a4c1b8186b5e313d2905561
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-07-30 14:56:05 -05:00

68 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
#
# Convenience wrapper to show the unreleased changes in all
# projects that have not yet been released.
TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR=$(dirname $TOOLSDIR)
source $TOOLSDIR/functions
if [[ -z "$VIRTUAL_ENV" ]]; then
if [[ ! -d $BASEDIR/.tox/venv ]]; then
(cd $BASEDIR && tox -e venv --notest)
fi
source $BASEDIR/.tox/venv/bin/activate
fi
# Figure out the current series from the releases directory.
current_series=$(python -c 'import openstack_releases.defaults; \
print(openstack_releases.defaults.RELEASE)')
if [ -z "$current_series" ]; then
echo "Could not determine the current release series."
exit 1
fi
# Figure out the previous series from the releases directory.
previous_series=$(ls $BASEDIR/deliverables | grep -B1 $current_series \
| head -n 1)
if [ -z "$previous_series" ]; then
echo "Could not determine the previous release series."
exit 1
fi
echo "Finding deliverables with no releases in the current series..."
deliverables=$(list-deliverables --unreleased)
for deliv in $deliverables; do
echo $deliv
done
function show_deliv {
# Show some details about the deliverable
title $deliv
echo
list-deliverables --deliverable "$deliv" -v
# Show the changes for each repo for the deliverable, as defined
# by the previous series releases.
repos=$(list-deliverables --deliverable "$deliv" --repos \
--series "$previous_series")
$TOOLSDIR/list_unreleased_changes.sh master $repos
}
for deliv in $deliverables; do
owner=$(echo \
$(grep team $BASEDIR/deliverables/$current_series/${deliv}.yaml \
| cut -f2 -d:) \
| sed -e 's/ /-/g')
if [[ -z "$owner" ]]; then
echo "ERROR: No owner for $deliv"
continue
fi
outfile=unreleased-${current_series}-${owner}.txt
show_deliv $deliv 2>&1 | tee $outfile
done