aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-09-30 08:22:18 +0100
committerGitHub2016-09-30 08:22:18 +0100
commit4e7e4ca4718e2516de05cc414ad5afb46aef488b (patch)
tree74d0833b21ae57acf1fd3eb601a9bcf629418d1b /Library
parentd6246278859f76ee1142754412d44a80eb1da0c6 (diff)
parentd4311fd49fe298513d71b269763f33e4f8069ba3 (diff)
downloadbrew-4e7e4ca4718e2516de05cc414ad5afb46aef488b.tar.bz2
Merge pull request #1182 from MikeMcQuaid/update-old-git-tags
update.sh: use sort instead of git tag --sort.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 54eca1376..5c72c24f9 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -217,7 +217,8 @@ merge_or_rebase() {
if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]]
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]*$')"
else
UPSTREAM_TAG=""