Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 09f5b75

Browse files
authored
[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.
1 parent b822009 commit 09f5b75

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

eng/Brewfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
brew "icu4c"
2+
brew "openssl"

eng/build-job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
# and FreeBSD builds use a build agent with dependencies
9595
# preinstalled, so we only need this step for OSX and Windows.
9696
- ${{ if eq(parameters.osGroup, 'OSX') }}:
97-
- script: sh eng/install-native-dependencies.sh $(osGroup)
97+
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
9898
displayName: Install native dependencies
9999
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
100100
# Necessary to install python

eng/install-native-dependencies.sh

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
if [ "$1" = "Linux" ]; then
44
sudo apt update
@@ -14,7 +14,9 @@ elif [ "$1" = "OSX" ]; then
1414
if [ "$?" != "0" ]; then
1515
exit 1;
1616
fi
17-
brew install icu4c openssl
17+
18+
engdir=$(dirname "${BASH_SOURCE[0]}")
19+
brew bundle --no-upgrade --no-lock --file "${engdir}/Brewfile"
1820
if [ "$?" != "0" ]; then
1921
exit 1;
2022
fi
@@ -26,4 +28,3 @@ else
2628
echo "Must pass \"Linux\" or \"OSX\" as first argument."
2729
exit 1
2830
fi
29-

0 commit comments

Comments
 (0)