[tools/grep-all] Sort the open branches by the series name

Currently we don't sort the open branches which leads to them printing
in an order up to git.  Lets sort them by the series name so we have:

 1.2.0-1052-ga00761ff  : requests  # Apache-2.0
 origin/master         : requests  # Apache-2.0
 origin/stable/rocky   : requests  # Apache-2.0
 origin/stable/queens  : requests>=2.14.2  # Apache-2.0
 origin/stable/pike    : requests>=2.14.2  # Apache-2.0
 origin/stable/ocata   : requests>=2.10.0,!=2.12.2  # Apache-2.0
 origin/stable/newton  : requests>=2.10.0  # Apache-2.0
 mitaka-eol            : requests>=2.8.1,!=2.9.0  # Apache-2.0
 liberty-eol           : requests>=2.5.2,!=2.8.0,!=2.9.0
 kilo-eol              : requests>=2.2.0,!=2.4.0,<2.8.0
 juno-eol              : requests>=2.1.0,!=2.4.0,<=2.2.1
 icehouse-eol          : requests>=1.1,<=2.6.0
 havana-eol            : requests>=1.1
 grizzly-eol           :
 folsom-eol            :

Which I think is easier to parse as the lower on the list the older.

Change-Id: Ib436bc5cc1bd3f13176485909003cc00cf348c1a
This commit is contained in:
Tony Breeds 2018-09-12 13:06:42 +10:00
parent 00b698e62b
commit 3314a6dbca
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
# Note(tonyb): Expand HEAD into something that's hopefully more human
# readable
declare -a refs=($(git describe --always) origin/master)
refs+=($(git branch --no-color -r --list 'origin/stable/*'))
refs+=($(git branch --no-color -r --list 'origin/stable/*' | sort -r -t/ -k 3))
refs+=($(git tag --list '*-eol' | sort -r))
if [ $# -ne 1 ]; then