From 14e3d6e7493e039356b557394cbdfd358103ce5e Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 8 Feb 2017 17:43:15 -0500 Subject: [PATCH] script to report on unreleased changes of deliverables with no releases The script creates a separate output file for each team because combining all of the data into one makes it to big to post on a pastebin. Change-Id: Ie5bfb0df225378e658ebb3c5d57d55d0dff7aca6 Signed-off-by: Doug Hellmann --- .gitignore | 1 + tools/list_changes_unreleased_deliverables.sh | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100755 tools/list_changes_unreleased_deliverables.sh diff --git a/.gitignore b/.gitignore index 1b5a3be5b7..d485405fca 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /.coverage* /.testrepository/ /cover/ +/unreleased-*.txt diff --git a/tools/list_changes_unreleased_deliverables.sh b/tools/list_changes_unreleased_deliverables.sh new file mode 100755 index 0000000000..b61fb2c7ff --- /dev/null +++ b/tools/list_changes_unreleased_deliverables.sh @@ -0,0 +1,63 @@ +#!/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