Skip to content

Commit

Permalink
feat(zsh): Resolve issues with ZSH + runner
Browse files Browse the repository at this point in the history
  • Loading branch information
sylus committed Feb 23, 2024
1 parent 8d85afa commit c2bf20a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 7 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,16 @@ jobs:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: ./install.sh

- name: Run tests
run: ~/.local/bin/check-dotfiles
- name: Switch to ZSH
if: runner.os == 'Linux'
shell: /home/linuxbrew/.linuxbrew/bin/zsh {0}
run: |
source ~/.zshenv
~/.local/bin/check-dotfiles
- name: Switch to ZSH
if: runner.os == 'macOS'
shell: /opt/homebrew/bin/zsh {0}
run: |
source ~/.zshenv
~/.local/bin/check-dotfiles
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/usr/bin/env bash

# Install XCode
xcode-select -p >/dev/null 2>&1 || xcode-select --install

# Install Visual Studio Code
# curl -o vscode.zip -L https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal
# unzip -q vscode.zip
# rm vscode.zip
# mv "Visual Studio Code.app" /Applications/
# export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"

if ! command -v brew >/dev/null 2>&1; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Expand All @@ -17,6 +25,7 @@ brew update

# Temporary Overrides
brew install --overwrite [email protected]
brew install --overwrite [email protected]
brew install --overwrite go

brew bundle --verbose --no-lock --file=/dev/stdin <<EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ! command -v brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

{{ if eq .host.arch "arm64" -}}
{{- if eq .host.arch "arm64" }}
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
{{- else }}
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ! command -v brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

{{ if eq .host.arch "arm64" -}}
{{- if eq .host.arch "arm64" }}
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
{{- else }}
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
Expand Down
1 change: 0 additions & 1 deletion home/.chezmoitemplates/darwin/brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"qlstephen"
"slack"
"spectacle"
"visual-studio-code"
-}}

{{- range ($taps | sortAlpha | uniq) }}
Expand Down
1 change: 1 addition & 0 deletions home/.chezmoitemplates/universal/packages
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"watch"
"wget"
"zplug"
"zsh"
"zsh-autosuggestions"
"zsh-syntax-highlighting"
-}}
Expand Down
3 changes: 2 additions & 1 deletion home/dot_zshenv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export ZDOTDIR=$HOME/.config/zsh/
ZDOTDIR=$HOME/.config/zsh/
source -- "$ZDOTDIR"/.zshrc
10 changes: 9 additions & 1 deletion home/private_dot_config/zsh/dot_zshrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

export HOMEBREW_NO_AUTO_UPDATE=1

{{ if eq .chezmoi.os "linux" -}}
{{- if eq .chezmoi.os "linux" }}
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
{{- end }}

Expand Down Expand Up @@ -139,6 +139,14 @@ export NVM_DIR="$HOME/.nvm"

ln -sf "$(brew --prefix)/bin/python"{3,}

{{ if eq .chezmoi.os "darwin" -}}
# Visual Studio Code Configuration
# -----------------------------------------------------------------------------

# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
{{- end }}

# Includes
# -----------------------------------------------------------------------------

Expand Down

0 comments on commit c2bf20a

Please sign in to comment.