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

install: use stable tag. #839

Merged
merged 1 commit into from Mar 14, 2024
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
8 changes: 7 additions & 1 deletion install.sh
Expand Up @@ -914,8 +914,14 @@ ohai "Downloading and installing Homebrew..."

execute "${USABLE_GIT}" "fetch" "--force" "origin"
execute "${USABLE_GIT}" "fetch" "--force" "--tags" "origin"
execute "${USABLE_GIT}" "remote" "set-head" "origin" "--auto" >/dev/null

execute "${USABLE_GIT}" "reset" "--hard" "origin/master"
LATEST_GIT_TAG="$("${USABLE_GIT}" tag --list --sort="-version:refname" | head -n1)"
if [[ -z "${LATEST_GIT_TAG}" ]]
then
abort "Failed to query latest Homebrew/brew Git tag."
fi
execute "${USABLE_GIT}" "checkout" "--force" "-B" "stable" "${LATEST_GIT_TAG}"

if [[ "${HOMEBREW_REPOSITORY}" != "${HOMEBREW_PREFIX}" ]]
then
Expand Down