From ccabaf1a7d8d1393a2ba06347f0b2cd1fc635925 Mon Sep 17 00:00:00 2001 From: Yasmin Teles Date: Sun, 10 Mar 2024 19:12:08 -0300 Subject: [PATCH] feat: add Homebrew --- .github/workflows/health-check.yml | 13 ++++++++----- install.sh | 1 + uninstall.sh | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/health-check.yml b/.github/workflows/health-check.yml index f4417a5..c261204 100644 --- a/.github/workflows/health-check.yml +++ b/.github/workflows/health-check.yml @@ -23,11 +23,14 @@ jobs: runs-on: macos-14 timeout-minutes: 50 steps: - - name: Set up Homebrew PATH - run: echo "/usr/local/bin:/usr/bin:/bin" >> "${GITHUB_PATH}" - - - name: Homebrew install - run: brew reinstall git + - name: Clean up installed software + if: startsWith(matrix.os, 'macos') + run: | + brew uninstall --ignore-dependencies --force $(brew list --formula) + # brew uninstall --cask --force $(brew list --cask) + brew uninstall --cask --force firefox google-chrome + brew cleanup --prune-prefix + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" - name: Run install script run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/YasminTeles/dotfiles/main/install.sh)" diff --git a/install.sh b/install.sh index 7a3c30b..f183644 100644 --- a/install.sh +++ b/install.sh @@ -26,6 +26,7 @@ mkdir ~/Projects # -- Dependencies ----------------------------------------------------------------- step_msg "Installing dependencies" +NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" brew install stow >/dev/null # -- Dotfiles ----------------------------------------------------------------- diff --git a/uninstall.sh b/uninstall.sh index 70a1b8f..9a277d3 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -39,6 +39,10 @@ then rm -rf ~/.oh-my-zsh brew uninstall --force $(brew list) + # -- Homebrew ---------------------------------------------------------------- + step_msg "Removing Homebrew" + NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" + # -- Dotfiles ---------------------------------------------------------------- step_msg "Removing Dotfiles directory" rm -rf ~/.dotfiles