Skip to content

Commit fafd915

Browse files
committed
feat: asdfのセットアップスクリプトを作成
1 parent 6bb5c5e commit fafd915

5 files changed

Lines changed: 44 additions & 2 deletions

File tree

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
local.*
77

88
### ssh ###
9-
.ssh
9+
.ssh
10+
11+
### ASDF ###
12+
/asdf/*
13+
!/asdf/.tool-versions
14+
!/asdf/plugins.txt

asdf/.tool-versions

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ruby 3.3.4
2+
awscli 2.16.5
3+
flutter 3.29.2-stable
4+
gradle 8.4
5+
java openjdk-17.0.2
6+
nodejs 20.12.2
7+
pre-commit 3.7.1
8+
yarn 1.22.22
9+
kotlin 2.1.10
10+
rust 1.85.1

asdf/plugins.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
awscli https://github.com/MetricMike/asdf-awscli.git
2+
flutter https://github.com/oae/asdf-flutter.git
3+
gradle https://github.com/rfrancis/asdf-gradle.git
4+
java https://github.com/halcyon/asdf-java.git
5+
kotlin https://github.com/asdf-community/asdf-kotlin.git
6+
nodejs https://github.com/asdf-vm/asdf-nodejs.git
7+
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git
8+
ruby https://github.com/asdf-vm/asdf-ruby.git
9+
rust https://github.com/code-lever/asdf-rust.git
10+
yarn https://github.com/twuni/asdf-yarn.git

scripts/asdf_setup.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env zsh
2+
set -euo pipefail
3+
4+
echo "「ASDF」のセットアップを開始しました"
5+
6+
# プラグインを出力
7+
asdf plugin list --urls > ~/dotfiles/asdf/plugins.txt
8+
9+
# プラグインをインストール
10+
while read -r name url; do
11+
asdf plugin add "$name" "$url" || true
12+
done < ~/dotfiles/asdf/plugins.txt
13+
14+
# 一括インストール
15+
asdf install
16+
17+
echo "「ASDF」のセットアップが完了しました"

scripts/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ echo "「dotfiles」のセットアップを開始しました"
66
INSTALL_DIR="$HOME/dotfiles"
77

88
sh "$INSTALL_DIR/scripts/homebrew_setup.sh"
9-
9+
sh "$INSTALL_DIR/scripts/asdf_setup.sh"
1010
echo "「dotfiles」のセットアップが完了しました"

0 commit comments

Comments
 (0)