Skip to content

Commit 0e3da94

Browse files
Replace asdf with mise (#13)
* Replace asdf with mise * Removed `direnv` from `mise` config Updated `helm-ct` to version `3.12.0` function `install_mise_tool_versions` now trusts repo `dot-files` Moved `mise activate` from OS specific `bash_profile` to OS independent `bash_profile`
1 parent a1e09cf commit 0e3da94

17 files changed

Lines changed: 62 additions & 251 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ Thumbs.db
5050
!.ssh/config
5151
.aws/*
5252
!.aws/config
53-
.asdf
54-
.asdf/*
5553
.composer/*
5654
.dlv/*
5755
!.dlv/config.yml

MacOS/base

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function are_basics_installed() {
1414
# `awscli` https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html
1515
declare -a BREW_BASICS=(
1616
'actionlint'
17-
'asdf'
1817
'awscli'
1918
'bash'
2019
'coreutils'
@@ -32,6 +31,7 @@ function are_basics_installed() {
3231
'bitwarden-cli'
3332
'mackup'
3433
'mas'
34+
'mise'
3535
'oh-my-posh'
3636
'parallel'
3737
'pssh'
@@ -49,26 +49,12 @@ function are_basics_installed() {
4949
install_if_not_installed 'brew' "${ASK}" "${BREW_BASICS[@]}"
5050
}
5151

52-
function is_asdf_installed() {
52+
function is_mise_installed() {
5353
local ASK="${1:-'y'}"
54-
if ! command -v asdf &> /dev/null || ! command -v brew &> /dev/null; then
55-
declare -a ASDF_DEPS=('autoconf'
56-
'automake'
57-
'coreutils'
58-
'gcc'
59-
'libtool'
60-
'libxslt'
61-
'libyaml'
62-
'openssl'
63-
'make'
64-
'readline'
65-
'unixodbc'
66-
'unzip')
54+
if ! command -v mise &> /dev/null || ! command -v brew &> /dev/null; then
6755
msg_info 'Will try to install brew if not installed'
6856
are_basics_installed "${ASK}"
69-
msg_info 'Will try to install asdf dependencies'
70-
install_if_not_installed 'brew' "${ASK}" "${ASDF_DEPS[@]}"
71-
msg_info 'Will try to install asdf using git'
72-
source_asdf
57+
msg_info 'Will try to activate mise'
58+
source_mise
7359
fi
7460
}

MacOS/bash_profile

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,6 @@ if [ -f "$(brew --prefix)"/etc/bash_completion ]; then
1010
source "$(brew --prefix)"/etc/bash_completion
1111
fi
1212

13-
# `asdf` is now managed by homebrew
14-
export ASDF_DATA_DIR="${HOME}/.asdf"
15-
# shellcheck disable=SC1090
16-
. <(asdf completion bash)
17-
# Hook direnv into your shell.
18-
# shellcheck disable=SC1091
19-
. "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/bashrc"
20-
21-
# Go specific env vars
22-
GOPATH="${HOME}/src/gopath"
23-
GOROOT="$(asdf where golang)/go"
24-
export GOPATH GOROOT
25-
26-
# Java specific env vars
27-
JDK_HOME="$(asdf where java)"
28-
JAVA_HOME="$(asdf where java)/jre"
29-
export JDK_HOME JAVA_HOME
30-
3113
# Update PATH
3214
export PATH="$(brew --prefix)/opt/curl/bin:${PATH}:${HOME}/src/gopath/bin:${HOME}/bin"
3315

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Keep key configurations and share them among your computers
88

99
- Installs:
1010
- [1password-cli](https://support.1password.com/command-line/)
11-
- [asdf](https://github.com/asdf-vm/asdf)
11+
- [mise](https://github.com/jdx/mise)
1212
- [awscli](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)
1313
- [oh-my-posh](https://ohmyposh.dev)
1414
- [bfg](https://rtyley.github.io/bfg-repo-cleaner/)

Ubuntu/base

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ function are_basics_installed() {
4343
BREW_BASICS=(
4444
'actionlint'
4545
'asciidoc'
46-
'asdf'
4746
'awscli'
4847
'fontconfig'
4948
'gcc'
@@ -53,6 +52,7 @@ function are_basics_installed() {
5352
'jless'
5453
'jq'
5554
'mackup'
55+
'mise'
5656
'oh-my-posh'
5757
'parallel'
5858
'pssh'
@@ -71,29 +71,12 @@ function are_basics_installed() {
7171
install_if_not_installed 'brew' "${ASK}" "${BREW_BASICS[@]}"
7272
}
7373

74-
function is_asdf_installed() {
74+
function is_mise_installed() {
7575
local ASK="${1:-'y'}"
76-
if [[ ! -e "${HOME}/.asdf/asdf.sh" ]] || [[ ! -e "$(get_brew_location)" ]]; then
77-
# Ubuntu 18.04 `apt install -y libncurses-dev libxslt-dev` gives the output below
78-
# Note, selecting 'libncurses5-dev' instead of 'libncurses-dev'
79-
# Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
80-
declare -a ASDF_DEPS=('autoconf'
81-
'automake'
82-
'libbz2-dev'
83-
'libffi-dev'
84-
'libncurses5-dev'
85-
'libreadline-dev'
86-
'libsqlite3-dev'
87-
'libssl-dev'
88-
'libtool'
89-
'libxslt1-dev'
90-
'libyaml-dev'
91-
'unixodbc-dev'
92-
'unzip')
76+
if ! command -v mise &> /dev/null || [[ ! -e "$(get_brew_location)" ]]; then
77+
msg_info 'Will try to install brew if not installed'
9378
are_basics_installed "${ASK}"
94-
msg_info 'Will try to install asdf dependencies'
95-
install_if_not_installed 'apt' "${ASK}" "${ASDF_DEPS[@]}"
96-
msg_info 'Will try to install asdf using git'
97-
source_asdf
79+
msg_info 'Will try to activate mise'
80+
source_mise
9881
fi
9982
}

Ubuntu/bash_profile

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
22

3-
# `asdf` is now managed by homebrew
4-
export ASDF_DATA_DIR="${HOME}/.asdf"
5-
# shellcheck disable=SC1090
6-
. <(asdf completion bash)
7-
# Hook direnv into your shell.
8-
# shellcheck disable=SC1091
9-
. "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/bashrc"
10-
11-
# Go specific env vars
12-
GOPATH="${HOME}/src/gopath"
13-
GOROOT="$(asdf where golang)/go"
14-
export GOPATH GOROOT
15-
16-
# Java specific env vars
17-
JDK_HOME="$(asdf where java)"
18-
JAVA_HOME="$(asdf where java)/jre"
19-
export JDK_HOME JAVA_HOME
20-
213
# check the window size after each command and, if necessary,
224
# update the values of LINES and COLUMNS.
235
shopt -s checkwinsize

asdfrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

bash_aliases

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,9 @@ function clean-multipass() {
109109
multipass purge
110110
}
111111

112-
function asdf-all () {
113-
awk '{ print $1 }' ~/.tool-versions | grep -v '^#'
114-
}
115-
116-
function asdf-all-versions () {
117-
for i in $(asdf plugin list); do
118-
echo "Plugin ${i} and versions are $(asdf list "${i}")"
112+
function mise-all-versions () {
113+
for i in $(mise plugin ls); do
114+
echo "Plugin ${i} and versions are $(mise ls -i "${i}")"
119115
done
120116
}
121117

@@ -282,7 +278,7 @@ function pkg_update() {
282278
"system"
283279
"mas"
284280
"brew"
285-
"asdf"
281+
"mise"
286282
"nodejs"
287283
"gem"
288284
"pip3"
@@ -299,7 +295,7 @@ function pkg_update() {
299295
msg_info "Packages to update: ${pkgs[*]}"
300296
for pkg in "${pkgs[@]}"; do
301297
case "${pkg}" in
302-
system|mas|brew|asdf|nodejs|gem|pip3|mackup)
298+
system|mas|brew|mise|nodejs|gem|pip3|mackup)
303299
pkg_update_"${pkg}"
304300
;;
305301
*)
@@ -359,14 +355,9 @@ function pkg_update_brew() {
359355
brew update; brew upgrade; brew cleanup;
360356
}
361357

362-
function pkg_update_asdf() {
363-
msg_info 'cd ~/.asdf/plugins/python/pyenv/ && git pull && cd -'
364-
cd ~/.asdf/plugins/python/pyenv/ || return 1
365-
git pull
366-
cd - || return 1
367-
368-
msg_info 'asdf plugin update --all'
369-
asdf plugin update --all
358+
function pkg_update_mise() {
359+
msg_info 'mise plugins ls | xargs -L1 mise plugins update'
360+
mise plugins ls | xargs -L1 mise plugins update
370361
}
371362

372363
function pkg_update_nodejs() {

bash_profile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@ eval "$(oh-my-posh init bash --config "${HOME}"/.ohmyposh.json)"
6767
if [ -f "${HOME}/.config/fabric/fabric-bootstrap.inc" ]; then
6868
. "${HOME}/.config/fabric/fabric-bootstrap.inc"
6969
fi
70+
71+
# activate mise
72+
# https://mise.jdx.dev/
73+
eval "$(mise activate bash)"

envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)