Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update.sh: use HOMEBREW_UPDATE_TO_TAG. #1143

Merged
merged 1 commit into from
Sep 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions Library/Homebrew/cmd/update.sh
Expand Up @@ -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]*$')"
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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).
Expand Down