update.sh: don't restore branch to stable.

Only run for Homebrew developers so assume they don’t want to switch
back to an old stable branch.

Fixes #1141.
This commit is contained in:
Mike McQuaid 2016-09-26 08:22:55 +01:00
parent 19952958a8
commit f6ec63cd8b

View File

@ -299,7 +299,7 @@ EOS
if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]] if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then then
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" && if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" &&
! "$INITIAL_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]$ ]] ! "$INITIAL_BRANCH" =~ ^v[0-9]+\.[0-9]+\.[0-9]|stable$ ]]
then then
git checkout "$INITIAL_BRANCH" "${QUIET_ARGS[@]}" git checkout "$INITIAL_BRANCH" "${QUIET_ARGS[@]}"
fi fi