Skip to content

Commit

Permalink
Merge pull request #998 from MikeMcQuaid/update-between-tags
Browse files Browse the repository at this point in the history
update.sh: update to latest Homebrew/brew tag.
  • Loading branch information
MikeMcQuaid committed Sep 21, 2016
2 parents 066cd46 + e8ebcb8 commit d5b6ecf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HOMEBREW_VERSION="0.9.9"
HOMEBREW_VERSION="1.0.0"

onoe() {
if [[ -t 2 ]] # check whether stderr is a tty.
Expand Down
15 changes: 13 additions & 2 deletions Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d5b6ecf

Please sign in to comment.