diff --git a/.config/mise/config.toml b/.config/mise/config.toml index af3502a..b5496e0 100644 --- a/.config/mise/config.toml +++ b/.config/mise/config.toml @@ -24,6 +24,7 @@ mkdir -p ~/github_hpeprod/yoshio-sugiyama_hpeprod "~/.config/*" = {} [bootstrap.repos] +"~/.dotfiles" = { url = "https://github.com/IMOKURI/dotfiles.git" } "~/src/bashmarks" = { url = "https://github.com/huyng/bashmarks.git" } "~/src/cat-bat" = { url = "https://github.com/catppuccin/bat.git" } diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index a58dae3..6dcef4c 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -16,6 +16,7 @@ jobs: - ubuntu os_version: - 24.04 + - 26.04 runs-on: ubuntu-latest container: ${{ matrix.os_name }}:${{ matrix.os_version }} @@ -34,5 +35,5 @@ jobs: HOME: /root MISE_GITHUB_TOKEN: ${{ secrets.MISE_GITHUB_TOKEN }} run: | - cp -a "${GITHUB_WORKSPACE}" /root/.dotfiles - bash /root/.dotfiles/install + cp -a "${GITHUB_WORKSPACE}/.config/mise/config.toml" /root/.mise-config.toml + bash ${GITHUB_WORKSPACE}/install diff --git a/README.md b/README.md index a691e59..d15f32c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Dotfiles that can be installed by one command ## Platforms - Ubuntu 24.04 +- Ubuntu 26.04 ## Requirements @@ -42,20 +43,15 @@ bash -c "$(curl -fsSL https://git.io/imokuri)" Test in Docker ```bash -docker run -it --rm ubuntu:24.04 bash +docker run -it --rm ubuntu bash apt update -apt install curl git -y +apt install curl -y export MISE_GITHUB_TOKEN="" +export BRANCH="" -git clone https://github.com/IMOKURI/dotfiles.git ~/.dotfiles -cd ~/.dotfiles - -# Optional: Change the branch to test -git checkout - -bash install +curl -fsSL https://raw.githubusercontent.com/IMOKURI/dotfiles/refs/heads/${BRANCH}/install | bash ``` diff --git a/install b/install index e44d549..e3df0bd 100755 --- a/install +++ b/install @@ -6,13 +6,16 @@ set -e export PATH=${HOME}/.local/bin:${HOME}/bin:${HOME}/.local/share/mise/shims:/usr/local/bin:${PATH} +# Mise +export MISE_GLOBAL_CONFIG_FILE="${HOME}/.mise-config.toml" + +# Bootstrap branch +BRANCH="${BRANCH:-master}" + # Defind Colors BANNER="\033[38;2;101;178;255m" # BLUE CLEAR_COLOR="\033[0m" -# Define path -DOTPATH="$HOME/.dotfiles" - ##### Functions ############################################################### COL=120 @@ -22,18 +25,13 @@ function _banner() { printf "\n${BANNER}%s %s${CLEAR_COLOR}\n\n" "${1}" "${sep:${#1}}" } -##### Download Dotfiles ###################################################### - -_banner "Download Dotfiles..." +##### Bootstrap ############################################################## -if [[ ! -d "${DOTPATH}" ]]; then - git clone --recursive https://github.com/IMOKURI/dotfiles.git "${DOTPATH}" - mkdir -p ${HOME}/.config - ln -sfnv "${DOTPATH}/.config/mise" "${HOME}/.config/mise" +if [ ! -f "${MISE_GLOBAL_CONFIG_FILE}" ]; then + _banner "Download mise global config..." + curl -fsSL -o ${MISE_GLOBAL_CONFIG_FILE} https://raw.githubusercontent.com/IMOKURI/dotfiles/refs/heads/${BRANCH}/.config/mise/config.toml fi -##### Bootstrap ############################################################## - _banner "Install mise..." curl https://mise.run | sh