From 09f5b75f3742e39cacf2236e5ba264c415f45323 Mon Sep 17 00:00:00 2001 From: Juan Hoyos Date: Thu, 8 Jul 2021 14:21:01 -0700 Subject: [PATCH] [release/3.1] #28183 Fix OSX native dependency installation * Avoid upgrading packages that are explicitly installed. * Use a brewfile * Change shebang to use bash and directly execute. --- eng/Brewfile | 2 ++ eng/build-job.yml | 2 +- eng/install-native-dependencies.sh | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 eng/Brewfile mode change 100644 => 100755 eng/install-native-dependencies.sh diff --git a/eng/Brewfile b/eng/Brewfile new file mode 100644 index 000000000000..0c6f1a860387 --- /dev/null +++ b/eng/Brewfile @@ -0,0 +1,2 @@ +brew "icu4c" +brew "openssl" diff --git a/eng/build-job.yml b/eng/build-job.yml index 1b0cf8bcb639..f93f9e0d6693 100644 --- a/eng/build-job.yml +++ b/eng/build-job.yml @@ -94,7 +94,7 @@ jobs: # and FreeBSD builds use a build agent with dependencies # preinstalled, so we only need this step for OSX and Windows. - ${{ if eq(parameters.osGroup, 'OSX') }}: - - script: sh eng/install-native-dependencies.sh $(osGroup) + - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) displayName: Install native dependencies - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: # Necessary to install python diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh old mode 100644 new mode 100755 index 309b41d6f8cd..e13441f93a20 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash if [ "$1" = "Linux" ]; then sudo apt update @@ -14,7 +14,9 @@ elif [ "$1" = "OSX" ]; then if [ "$?" != "0" ]; then exit 1; fi - brew install icu4c openssl + + engdir=$(dirname "${BASH_SOURCE[0]}") + brew bundle --no-upgrade --no-lock --file "${engdir}/Brewfile" if [ "$?" != "0" ]; then exit 1; fi @@ -26,4 +28,3 @@ else echo "Must pass \"Linux\" or \"OSX\" as first argument." exit 1 fi -