From 7472f8d0ada966d3613e49ca75a8f5a8593c4b63 Mon Sep 17 00:00:00 2001 From: chansooo Date: Mon, 3 Jun 2024 01:17:32 +0900 Subject: [PATCH] =?UTF-8?q?infra:=20mise=20=EC=84=B8=EC=85=98=20=EC=A6=89?= =?UTF-8?q?=EC=8B=9C=20=EC=A0=81=EC=9A=A9=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pullRequest.yml | 5 +++-- Scripts/onboarding.sh | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pullRequest.yml b/.github/workflows/pullRequest.yml index 69d6dec..15ecdc2 100644 --- a/.github/workflows/pullRequest.yml +++ b/.github/workflows/pullRequest.yml @@ -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 @@ -36,4 +38,3 @@ jobs: - name: Build and Test run: tuist test PPACIOS-Workspace - diff --git a/Scripts/onboarding.sh b/Scripts/onboarding.sh index e21d85f..96f0a78 100644 --- a/Scripts/onboarding.sh +++ b/Scripts/onboarding.sh @@ -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 -