diff --git a/.medic/doctor.exs b/.medic/doctor.exs index bc8bff9..447a2cc 100644 --- a/.medic/doctor.exs +++ b/.medic/doctor.exs @@ -1,5 +1,5 @@ [ - {Medic.Checks.Asdf, :plugin_installed?, ["rust"]}, + {Medic.Checks.ToolVersions, :plugin_installed?, ["rust"]}, {Medic.Checks.Hex, :local_hex_installed?}, {Medic.Checks.Hex, :local_rebar_installed?}, {Medic.Checks.Hex, :packages_installed?} diff --git a/.medic/require.exs b/.medic/require.exs index 1a6aae9..b852855 100644 --- a/.medic/require.exs +++ b/.medic/require.exs @@ -1,3 +1,3 @@ Mix.install([ - {:medic, "~> 1.9", force: true} + {:medic, "~> 1.11", force: true} ]) diff --git a/bin/dev/doctor b/bin/dev/doctor index 5e3d152..fb4ebf1 100755 --- a/bin/dev/doctor +++ b/bin/dev/doctor @@ -15,21 +15,31 @@ fi cecho --green "\n▸" --bright-bold-cyan "Running initial doctor checks..." -check "asdf: installed" \ - "command -v asdf" \ +check "tool-versions: installed" \ + "command -v mise || command -v asdf" \ "open 'https://asdf-vm.com/#/core-manage-asdf'" -check "asdf: erlang plugin installed" \ - "asdf plugin-list | grep erlang" \ - "asdf plugin-add erlang" +if command -v mise; then + TOOLS="mise" +elif command -v asdf; then + TOOLS="asdf" +fi + +check "tool-versions: erlang plugin installed" \ + "${TOOLS} plugin-list | grep erlang" \ + "${TOOLS} plugin add erlang" + +check "tool-versions: elixir plugin installed" \ + "${TOOLS} plugin-list | grep elixir" \ + "${TOOLS} plugin add elixir" -check "asdf: elixir plugin installed" \ - "asdf plugin-list | grep elixir" \ - "asdf plugin-add elixir" +check "tool-versions: postgres plugin installed" \ + "${TOOLS} plugin-list | grep postgres" \ + "${TOOLS} plugin add postgres" -check "asdf: tools are installed" \ - "asdf which erl > /dev/null && asdf which elixir > /dev/null" \ - "asdf install" +check "tool-versions: tools are installed" \ + "${TOOLS} which erl > /dev/null && ${TOOLS} which elixir > /dev/null" \ + "${TOOLS} install" echo ""