From 260d100eb6534708561af9f1751923a8dbe18169 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 22 Jan 2018 16:55:31 -0500 Subject: [PATCH] show values at -eol tags as well as on branches Sometimes we want to go further back in history than the current open branches, so include the -eol tags as well. Change-Id: Idb7ca9d0f4dd2f7dc6701577cc495a8010ee1340 Signed-off-by: Doug Hellmann --- tools/grep-all.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tools/grep-all.sh b/tools/grep-all.sh index cafc2b396a..2a040fa528 100755 --- a/tools/grep-all.sh +++ b/tools/grep-all.sh @@ -17,6 +17,7 @@ declare -a branches=($(git describe --always) origin/master) branches+=($(git branch --no-color -r --list 'origin/stable/*')) +declare -a tags=($(git tag --list '*-eol' | sort)) if [ $# -ne 1 ]; then echo "Usage: $0 dependency-name" 1>&2 @@ -24,15 +25,23 @@ if [ $# -ne 1 ]; then fi function search { - git grep -hEi "^${1}[=>/dev/null } -printf '\nRequirements\n' +printf '\nRequirements\n------------\n' for branch in ${branches[@]} ; do printf "%-22s: %s\n" $branch "$(search $1 $branch global-requirements.txt)" done +echo +for tag in ${tags[@]} ; do + printf "%-22s: %s\n" $tag "$(search $1 $tag global-requirements.txt)" +done -printf '\nConstraints\n' +printf '\nConstraints\n-----------\n' for branch in ${branches[@]} ; do printf "%-22s: %s\n" $branch "$(search $1 $branch upper-constraints.txt)" done +echo +for tag in ${tags[@]} ; do + printf "%-22s: %s\n" $tag "$(search $1 $tag upper-constraints.txt)" +done