Skip to content

Commit 1cbe077

Browse files
build: Amend use of Brewfile and point of call (#118)
* build: Amend Brewfile installations and point of call - remove part of the action that was using Brewfile toi install software on the pipeline as that si redundant since all instrallations are taking place as part of plugins and teh rest were MacOS specific - amend `firstTimeDevSetup` to use the gits Brewfile, clone and install the required software and then remove the cloned directory * build: Simplify the function - store addresses and directory root in variable to have one source of truth
1 parent 39a2d08 commit 1cbe077

3 files changed

Lines changed: 12 additions & 7 deletions

File tree

actions/setup-runner/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,3 @@ runs:
9090
run: |
9191
sdkmanager --update
9292
shell: bash
93-
94-
- name: Install project defined homebrew dependencies
95-
run: |
96-
if [ -f Brewfile ]; then brew bundle; fi
97-
shell: bash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# This script assumes that the dependencies declared within the `Brewfile` are installed.
3+
# This script assumes that the dependencies declared within the https://gist.github.com/BiancaMihaila/6473ba331c185aa8e9551fd51e5da4a9 are installed
44

55
# Obtains the current version of the project as designated via git conventional commits.
66
cog -v get-version --fallback 0.1.0

scripts/firstTimeDevSetup

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
BASH_CONFIG_FILE=~/.bash_profile
44
GIT_ROOT=$(git rev-parse --show-toplevel)
55
ZSH_CONFIG_FILE=~/.zshrc
6+
# Use the address below to access the gist for the Brewfile and make any changes if required
7+
# shellcheck disable=SC2034
8+
BREW_GIST=https://gist.github.com/BiancaMihaila/6473ba331c185aa8e9551fd51e5da4a9
9+
# This will have to be amended to either grab the hash from the above URL or always manually updated for the hash - less likely to change
10+
BREW_PATH="${GIT_ROOT}/6473ba331c185aa8e9551fd51e5da4a9"
611

712
# Checks the provided file for provided EVAL_STRING. If not, appends to the config file if it exists.
813
# Parameters:
@@ -54,7 +59,12 @@ function installHomebrewIfNecessary {
5459
# Installs all dependencies declared within the code base.
5560
function installProjectDependencies {
5661
echo "## Installing Brewfile dependencies... ##"
57-
brew bundle --file="${GIT_ROOT}/Brewfile"
62+
git clone BREW_GIST
63+
cd "${BREW_PATH}" || exit
64+
brew bundle
65+
cd ../
66+
echo "## Deleting Brewfile after installations:... ##"
67+
rm -rf "${BREW_PATH}" 2> /dev/null
5868
}
5969

6070
## SCRIPT STARTS HERE ##

0 commit comments

Comments
 (0)