Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
creasty committed May 20, 2024
1 parent 128c599 commit 37b4417
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ jobs:
fail-fast: false
matrix:
include:
- tags: base,install.homebrew.tap,install.homebrew.formula
- tags: base,lang
- tags: install,app,system
- name: fundamental
tags: base,install.homebrew.tap,install.homebrew.formula
- name: language support
tags: base,lang
- name: apps and system
tags: install,app,system
skip_tags: install.homebrew.formula
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2

Expand Down
36 changes: 18 additions & 18 deletions provision
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ clone_or_update_repo() {
fi
}

load_envs() {
export ANYENV_INIT_CACHE_DISABLED=1
source "$DOTFILES_PATH/shell/profile"
}

check_xcode_license_approved() {
accept_xcode_license() {
echo 'Agreeing to Xcode license...'

if ! [[ "$(/usr/bin/xcrun clang 2>&1 || true)" =~ 'license' ]]; then
Expand All @@ -85,6 +80,21 @@ check_xcode_license_approved() {
echo 'done'
}

install_rosetta2() {
echo 'Installing Rosetta 2...'
if [ -d /usr/libexec/rosetta ]; then
echo 'skip (already installed)'
return
fi
sudo softwareupdate --install-rosetta --agree-to-license
echo 'done'
}

load_envs() {
export ANYENV_INIT_CACHE_DISABLED=1
source "$DOTFILES_PATH/shell/profile"
}

install_homebrew() {
command -v 'brew' > /dev/null 2>&1 && return

Expand All @@ -110,16 +120,6 @@ install_ansible() {
echo 'done'
}

install_rosetta2() {
echo 'Installing Rosetta 2...'
if [ -d /usr/libexec/rosetta ]; then
echo 'skip (already installed)'
return
fi
sudo softwareupdate --install-rosetta --agree-to-license
echo 'done'
}

run_provisioning() {
echo 'Provisioning...'

Expand Down Expand Up @@ -149,13 +149,13 @@ main() {
print_header
check_os
clone_or_update_repo
check_xcode_license_approved
accept_xcode_license
install_rosetta2

load_envs
install_homebrew
install_python3
install_ansible
install_rosetta2
run_provisioning "$@"
}

Expand Down

0 comments on commit 37b4417

Please sign in to comment.