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

Commit

Permalink
[release/3.1] #28183 Fix OSX native dependency installation
Browse files Browse the repository at this point in the history
* Avoid upgrading packages that are explicitly installed.
* Use a brewfile
* Change shebang to use bash and directly execute.
  • Loading branch information
hoyosjs authored Jul 8, 2021
1 parent b822009 commit 09f5b75
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions eng/Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
brew "icu4c"
brew "openssl"
2 changes: 1 addition & 1 deletion eng/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions eng/install-native-dependencies.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

if [ "$1" = "Linux" ]; then
sudo apt update
Expand All @@ -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
Expand All @@ -26,4 +28,3 @@ else
echo "Must pass \"Linux\" or \"OSX\" as first argument."
exit 1
fi

0 comments on commit 09f5b75

Please sign in to comment.