Skip to content
Snippets Groups Projects
Commit eb0b028c authored by Bryan R's avatar Bryan R Committed by Mergify
Browse files

Stabilize use of brew

Use a specific release instead of HEAD.

(cherry picked from commit 6db1410b)
parent 3699fa54
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,8 @@ build-aarch64-darwin:
TARBALL_ARCHIVE_SUFFIX: aarch64-darwin
TARBALL_EXT: tar.xz
ADD_CABAL_ARGS: ""
# Update periodically.
BREW_VERSION: 4.0.5
artifacts:
expire_in: 2 week
paths:
......
#!/usr/bin/env bash
set -Eeuxo pipefail
set -Eeuo pipefail
# Install brew locally in the project dir. Packages will also be installed here.
[ -e "$CI_PROJECT_DIR/.brew" ] || git clone --depth=1 https://github.com/Homebrew/brew $CI_PROJECT_DIR/.brew
export PATH="$CI_PROJECT_DIR/.brew/bin:$CI_PROJECT_DIR/.brew/sbin:$PATH"
# FIXME: Use brew in supported way. See
# https://docs.brew.sh/Installation#untar-anywhere-unsupported
brew_dir="${CI_PROJECT_DIR}/.brew"
# Temporarily? ensure there's no caching accidentally happening.
rm -fr "${brew_dir}"
mkdir -p "${brew_dir}"
curl -L "https://github.com/Homebrew/brew/archive/refs/tags/${BREW_VERSION}.tar.gz" | tar xz --strip 1 -C "${brew_dir}"
export PATH="${brew_dir}/bin:${brew_dir}/sbin:$PATH"
# make sure to not pollute the machine with temp files etc
mkdir -p $CI_PROJECT_DIR/.brew_cache
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment