Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@
local.*

### ssh ###
.ssh
.ssh

### ASDF ###
/asdf/*
!/asdf/.tool-versions
!/asdf/plugins.txt
10 changes: 10 additions & 0 deletions asdf/.tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ruby 3.3.4
awscli 2.16.5
flutter 3.29.2-stable
gradle 8.4
java openjdk-17.0.2
nodejs 20.12.2
pre-commit 3.7.1
yarn 1.22.22
kotlin 2.1.10
rust 1.85.1
10 changes: 10 additions & 0 deletions asdf/plugins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
awscli https://github.com/MetricMike/asdf-awscli.git
flutter https://github.com/oae/asdf-flutter.git
gradle https://github.com/rfrancis/asdf-gradle.git
java https://github.com/halcyon/asdf-java.git
kotlin https://github.com/asdf-community/asdf-kotlin.git
nodejs https://github.com/asdf-vm/asdf-nodejs.git
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git
ruby https://github.com/asdf-vm/asdf-ruby.git
rust https://github.com/code-lever/asdf-rust.git
yarn https://github.com/twuni/asdf-yarn.git
17 changes: 17 additions & 0 deletions scripts/asdf_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env zsh
set -euo pipefail

echo "「ASDF」のセットアップを開始しました"

# プラグインを出力
asdf plugin list --urls > ~/dotfiles/asdf/plugins.txt

# プラグインをインストール
while read -r name url; do
asdf plugin add "$name" "$url" || true
done < ~/dotfiles/asdf/plugins.txt

# 一括インストール
asdf install

echo "「ASDF」のセットアップが完了しました"
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ echo "「dotfiles」のセットアップを開始しました"
INSTALL_DIR="$HOME/dotfiles"

sh "$INSTALL_DIR/scripts/homebrew_setup.sh"

sh "$INSTALL_DIR/scripts/asdf_setup.sh"
echo "「dotfiles」のセットアップが完了しました"
6 changes: 6 additions & 0 deletions zsh/.zshenv
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"

# ASDF
export ASDF_DATA_DIR="$HOME/dotfiles/asdf"
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
fpath=(${ASDF_DATA_DIR:-$HOME/.asdf}/completions $fpath)
autoload -Uz compinit && compinit