Skip to content

Commit

Permalink
infra: mise 세션 즉시 적용되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chansooo committed Jun 2, 2024
1 parent 7b34920 commit 7472f8d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:

- name: Install Setup Script and Fetch Dependencies
run: ./Scripts/onboarding.sh


- name: Source mise environment
run: source ~/.bashrc

- name: check mise
run: mise doctor
Expand All @@ -36,4 +38,3 @@ jobs:

- name: Build and Test
run: tuist test PPACIOS-Workspace

20 changes: 16 additions & 4 deletions Scripts/onboarding.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#!/bin/bash

# Install mise
curl https://mise.run | sh
~/.local/bin/mise --version

# Check mise version
~/.local/bin/mise --version

# Set up mise environment for bash
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
# note that bash will read from ~/.profile or ~/.bash_profile if the latter exists
# ergo, you may want to check to see which is defined on your system and only append to the existing file

# Ensure the mise environment is set up for the current session
eval "$(~/.local/bin/mise activate bash)"

# Set up PATH for mise
echo 'export PATH="$HOME/.local/share/mise/shims:$PATH"' >> ~/.bash_profile

# Ensure PATH is set up for the current session
export PATH="$HOME/.local/share/mise/shims:$PATH"

# Uncomment and set up for zsh if needed
# echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
# echo 'export PATH="$HOME/.local/share/mise/shims:$PATH"' >> ~/.zprofile
# if ! grep -q 'eval "$(~/.local/bin/mise activate zsh)"' ~/.zshrc; then
# echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
# fi

0 comments on commit 7472f8d

Please sign in to comment.