From d987f2ca11c4f26b5414ad81438344be93b6658c Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 8 Feb 2017 15:48:50 -0500 Subject: [PATCH] import list_stable_unreleased_changes.sh from release-tools Change-Id: Ibef585f5a6fb427a073fe069ab47db992a80f120 Signed-off-by: Doug Hellmann --- README.rst | 18 ++++++++++++++ tools/list_stable_unreleased_changes.sh | 32 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 tools/list_stable_unreleased_changes.sh diff --git a/README.rst b/README.rst index a5601729d8..67a8e327a3 100644 --- a/README.rst +++ b/README.rst @@ -532,3 +532,21 @@ tools/list_library_unreleased_changes.sh Runs list_unreleased_changes.sh for all libraries managed by any project. + +list_stable_unreleased_changes.sh +--------------------------------- + +Runs list_unreleased_changes.sh with the given branch for all +repositories tagged with ``stable:follows-policy``. + + +:: + + ./list_stable_unreleased_changes.sh stable/liberty + + +is equivalent to: + +:: + + ./list_unreleased_changes.sh stable/liberty $(list-deliverables --repos --series liberty) diff --git a/tools/list_stable_unreleased_changes.sh b/tools/list_stable_unreleased_changes.sh new file mode 100755 index 0000000000..9bd1547805 --- /dev/null +++ b/tools/list_stable_unreleased_changes.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Convenience wrapper to show the unreleased changes in all projects +# claiming to have stable branches, so we don't have to remember the +# incantation. + +if [[ $# -ne 1 ]]; then + echo "Usage: $(basename $0) " + exit 1 +fi + +SERIES=${1} + +TOOLSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname $TOOLSDIR) +source $TOOLSDIR/functions + +# Set up the virtualenv where the list-deliverables command will be +# found. This is done outside of the invocation below because +# otherwise we get the tox output mixed up in the repo list output and +# try to do things like look at the history of "venv" and +# "installing". +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 + +repos="$(list-deliverables --repos --tag stable:follows-policy --series $SERIES)" + +$TOOLSDIR/list_unreleased_changes.sh stable/$SERIES $repos