diff options
| author | Mike McQuaid | 2016-09-21 09:25:50 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-21 09:25:50 +0100 |
| commit | d5b6ecfc5078041ddf5f61b259c57f81d5c50fcc (patch) | |
| tree | e9104d702f2e7293bcf5077be757d5c6c51c84b2 | |
| parent | 066cd4656f4fde24bc73ea532d7bf32e79fa2b33 (diff) | |
| parent | e8ebcb834bcd54aa555b52cc6a06bf05e8b5ac1a (diff) | |
| download | brew-d5b6ecfc5078041ddf5f61b259c57f81d5c50fcc.tar.bz2 | |
Merge pull request #998 from MikeMcQuaid/update-between-tags1.0.0
update.sh: update to latest Homebrew/brew tag.
| -rw-r--r-- | Library/Homebrew/brew.sh | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/update.sh | 15 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index fc2e6993c..e82f7098a 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -1,4 +1,4 @@ -HOMEBREW_VERSION="0.9.9" +HOMEBREW_VERSION="1.0.0" onoe() { if [[ -t 2 ]] # check whether stderr is a tty. diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index acf4520ba..eb15e1029 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -215,7 +215,18 @@ merge_or_rebase() { trap reset_on_interrupt SIGINT - REMOTE_REF="origin/$UPSTREAM_BRANCH" + if [[ "$DIR" = "$HOMEBREW_REPOSITORY" && -z "$HOMEBREW_NO_UPDATE_CLEANUP" ]] + then + UPSTREAM_TAG="$(git tag --list --sort=-version:refname | head -n1)" + fi + + if [ -n "$UPSTREAM_TAG" ] + then + REMOTE_REF="refs/tags/$UPSTREAM_TAG" + UPSTREAM_BRANCH="v$UPSTREAM_TAG" + else + REMOTE_REF="origin/$UPSTREAM_BRANCH" + fi if [[ -n "$(git status --untracked-files=all --porcelain 2>/dev/null)" ]] then @@ -337,7 +348,7 @@ EOS set -x fi - if [[ -z "$HOMEBREW_UPDATE_CLEANUP" ]] + if [[ -z "$HOMEBREW_UPDATE_CLEANUP" && -z "$HOMEBREW_UPDATE_TO_TAG" ]] then if [[ -n "$HOMEBREW_DEVELOPER" || -n "$HOMEBREW_DEV_CMD_RUN" ]] then |
