Skip to content

Commit e1210ab

Browse files
authored
Merge pull request #20368 from chirsz-ever/chirsz/250804-short-option
cmd/update: use short option in update.sh
2 parents d2eb9c4 + 75b1e68 commit e1210ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Library/Homebrew/cmd/update.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ merge_or_rebase() {
211211
if [[ "${DIR}" == "${HOMEBREW_REPOSITORY}" && -n "${HOMEBREW_UPDATE_TO_TAG}" ]]
212212
then
213213
UPSTREAM_TAG="$(
214-
git tag --list |
215-
sort --field-separator=. --key=1,1nr -k 2,2nr -k 3,3nr |
216-
grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$'
214+
git tag --list --sort=-version:refname |
215+
grep -m 1 '^[0-9]*\.[0-9]*\.[0-9]*$'
217216
)"
218217
else
219218
UPSTREAM_TAG=""

0 commit comments

Comments
 (0)