diff options
| author | Mike McQuaid | 2016-09-25 21:53:28 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-09-25 21:53:28 +0100 |
| commit | 1ff2d06cf0fbad2642f00d9293222e74693343b5 (patch) | |
| tree | 939a640eea2081541b339166b6cd19c43b3628af /Library | |
| parent | 6e5735565b9a31ec2b01e02a479a361189729c22 (diff) | |
| download | brew-1ff2d06cf0fbad2642f00d9293222e74693343b5.tar.bz2 | |
update.sh: use HOMEBREW_UPDATE_TO_TAG.
This makes the code easier to follow rather than having to know
HOMEBREW_NO_UPDATE_CLEANUP implies not updating to a tag.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 4d72c6611..685e0e5f5 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -215,7 +215,7 @@ merge_or_rebase() { trap reset_on_interrupt SIGINT - if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -z "$HOMEBREW_NO_UPDATE_CLEANUP" ]] + if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]] then UPSTREAM_TAG="$(git tag --list --sort=-version:refname | grep --max-count=1 '^[0-9]*\.[0-9]*\.[0-9]*$')" @@ -351,6 +351,8 @@ EOS if [[ -n "$HOMEBREW_DEVELOPER" || -n "$HOMEBREW_DEV_CMD_RUN" ]] then export HOMEBREW_NO_UPDATE_CLEANUP="1" + else + export HOMEBREW_UPDATE_TO_TAG="1" fi fi @@ -471,7 +473,7 @@ EOS UPSTREAM_REPOSITORY="${UPSTREAM_REPOSITORY_URL#https://github.com/}" UPSTREAM_REPOSITORY="${UPSTREAM_REPOSITORY%.git}" - if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -z "$HOMEBREW_NO_UPDATE_CLEANUP" ]] + if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -n "$HOMEBREW_UPDATE_TO_TAG" ]] then # Only try to `git fetch` when the upstream tags have changed # (so the API does not return 304: unmodified). |
