diff --git a/README.md b/README.md index 0054ec1e..5cea9cd2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ _Required_ - Build dependencies - Homebrew (only on macOS) -- asdf +- mise - Erlang - Elixir - Phoenix diff --git a/lib/phx_tools_web/components/seo_meta_tag_component.ex b/lib/phx_tools_web/components/seo_meta_tag_component.ex index ae3916c9..b5578e3d 100644 --- a/lib/phx_tools_web/components/seo_meta_tag_component.ex +++ b/lib/phx_tools_web/components/seo_meta_tag_component.ex @@ -15,7 +15,7 @@ defmodule PhxToolsWeb.SeoMetaTagComponent do create a new Phoenix application, and launch the server... """ - @keywords "asdf, elixir, erlang, homebrew, phoenix, postgres, postgresql" + @keywords "elixir, erlang, homebrew, mise, phoenix, postgres, postgresql" attr :attributes, :map diff --git a/priv/static/Linux.sh b/priv/static/Linux.sh index 980222ab..3e352732 100755 --- a/priv/static/Linux.sh +++ b/priv/static/Linux.sh @@ -43,15 +43,15 @@ esac function already_installed() { case "$1" in - "asdf") - which asdf >/dev/null 2>&1 - ;; "Elixir") which elixir >/dev/null 2>&1 ;; "Erlang") command -v erl >/dev/null 2>&1 ;; + "mise") + which mise >/dev/null 2>&1 + ;; "Phoenix") mix phx.new --version >/dev/null 2>&1 ;; @@ -67,24 +67,17 @@ function already_installed() { function install() { case "$1" in - "asdf") - sudo apt-get update - sudo apt-get -y install curl git - git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1 - echo '. "$HOME/.asdf/asdf.sh"' >>$config_file - . "$HOME/.asdf/asdf.sh" - ;; + "Elixir") - asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git - asdf install elixir $elixir_version - asdf global elixir $elixir_version - asdf reshim + mise use -g elixir@$elixir_version ;; "Erlang") - asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git - asdf install erlang $erlang_version - asdf global erlang $erlang_version - asdf reshim + mise use -g erlang@$erlang_version + ;; + "mise") + curl https://mise.run | sh + echo 'eval "$(~/.local/bin/mise activate bash)"' >>$config_file + eval "$(~/.local/bin/mise activate bash)" ;; "Phoenix") mix local.hex --force @@ -94,10 +87,7 @@ function install() { "PostgreSQL") sudo apt-get update sudo apt-get -y install linux-headers-generic build-essential libssl-dev libreadline-dev zlib1g-dev libcurl4-openssl-dev uuid-dev icu-devtools - asdf plugin add postgres https://github.com/smashedtoatoms/asdf-postgres.git - asdf install postgres $postgres_version - asdf global postgres $postgres_version - asdf reshim + mise use -g postgres@$postgres_version ;; *) echo "Invalid name argument on install: $1" @@ -124,7 +114,7 @@ function add_env() { echo -e "${white}" sleep 1.5 - maybe_install "asdf" + maybe_install "mise" echo -e "${white}" sleep 1.5 @@ -195,7 +185,7 @@ echo -e "${bblue}${bold}The following will be installed if not available already echo -e "${cyan}${bold}" echo "1) Build dependencies" -echo "2) asdf" +echo "2) mise" echo "3) Erlang" echo "4) Elixir" echo "5) Phoenix" diff --git a/priv/static/macOS.sh b/priv/static/macOS.sh index b116da21..0b838289 100755 --- a/priv/static/macOS.sh +++ b/priv/static/macOS.sh @@ -43,9 +43,6 @@ esac function already_installed() { case "$1" in - "asdf") - which asdf >/dev/null 2>&1 - ;; "Elixir") which elixir >/dev/null 2>&1 ;; @@ -55,6 +52,9 @@ function already_installed() { "Homebrew") which brew >/dev/null 2>&1 ;; + "mise") + which mise >/dev/null 2>&1 + ;; "Phoenix") mix phx.new --version >/dev/null 2>&1 ;; @@ -73,38 +73,27 @@ function already_installed() { function install() { case "$1" in - "asdf") - brew install asdf - echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >>$config_file - . $(brew --prefix asdf)/libexec/asdf.sh - ;; "Elixir") - asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git - asdf install elixir $elixir_version - asdf global elixir $elixir_version - asdf reshim + mise use -g elixir@$elixir_version ;; "Erlang") - brew install autoconf openssl@1.1 wxwidgets libxslt fop - asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git - asdf install erlang $erlang_version - asdf global erlang $erlang_version - asdf reshim + mise use -g erlang@$erlang_version ;; "Homebrew") $current_shell -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ;; + "mise") + brew install mise + echo 'eval "$(mise activate '$current_shell')"' >>$config_file + eval "$(mise activate $current_shell)" + ;; "Phoenix") mix local.hex --force mix local.rebar --force mix archive.install --force hex phx_new $phoenix_version ;; "PostgreSQL") - brew install gcc readline zlib curl ossp-uuid - asdf plugin add postgres https://github.com/smashedtoatoms/asdf-postgres.git - asdf install postgres $postgres_version - asdf global postgres $postgres_version - asdf reshim + mise use -g postgres@$postgres_version ;; "Xcode Command Line Tools") xcode-select --install @@ -142,7 +131,7 @@ function add_env() { echo -e "${white}" sleep 1.5 - maybe_install "asdf" + maybe_install "mise" echo -e "${white}" sleep 1.5 @@ -214,7 +203,7 @@ echo -e "${cyan}${bold}" echo "1) Build dependencies" echo "2) Homebrew" -echo "3) asdf" +echo "3) mise" echo "4) Erlang" echo "5) Elixir" echo "6) Phoenix"