Merge pull request #1182 from MikeMcQuaid/update-old-git-tags

update.sh: use sort instead of git tag --sort.
This commit is contained in:
Mike McQuaid 2016-09-30 08:22:18 +01:00 committed by GitHub
commit 4e7e4ca471

View File

@ -217,7 +217,8 @@ merge_or_rebase() {
if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]] if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]]
then then
UPSTREAM_TAG="$(git tag --list --sort=-version:refname | UPSTREAM_TAG="$(git tag --list |
sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr |
grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$')" grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$')"
else else
UPSTREAM_TAG="" UPSTREAM_TAG=""