diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 63906bc..77f76a0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,11 +21,12 @@ jobs: run: | git config --global user.email "jdoe@example.com" git config --global user.name "J. Doe" - - name: Run install-dev-tools.sh + - name: Install mise run: | set -e - mkdir $HOME/bin - ./dev/bin/install-dev-tools.sh + set -x + curl https://mise.run | sh + mise install - name: Run precious run: | - PATH=$PATH:$HOME/bin precious lint -a + mise exec -- precious lint -a diff --git a/dev/bin/install-dev-tools.sh b/dev/bin/install-dev-tools.sh deleted file mode 100755 index c88b8f8..0000000 --- a/dev/bin/install-dev-tools.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -function run() { - echo "$1" - eval "$1" -} - -function install_tools() { - curl --silent --location \ - https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh | - sh - run "rustup component add clippy" - run "ubi --project houseabsolute/precious --in ~/bin" - run "ubi --project houseabsolute/omegasort --in ~/bin" - run "ubi --project koalaman/shellcheck --in ~/bin" - run "ubi --project mvdan/sh --in ~/bin --exe shfmt" - run "ubi --project crate-ci/typos --in ~/bin" - run "ubi --project tamasfe/taplo --tag 0.8.1 --in ~/bin" - run "npm install prettier@2.7.1" -} - -if [ "$1" == "-v" ]; then - set -x -fi - -mkdir -p "$HOME/bin" - -set +e -if echo ":$PATH:" | grep --extended-regexp ":$HOME/bin:" >&/dev/null; then - path_has_home_bin=1 -fi -set -e - -if [ -z "$path_has_home_bin" ]; then - PATH=$HOME/bin:$PATH -fi - -install_tools - -echo "Tools were installed into $HOME/bin." -if [ -z "$path_has_home_bin" ]; then - echo "You should add $HOME/bin to your PATH." -fi - -exit 0 diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..db795b6 --- /dev/null +++ b/mise.toml @@ -0,0 +1,9 @@ +[tools] +node = "22.11.0" +"npm:prettier" = "3.4.1" +shellcheck = "v0.10.0" +shfmt = "v3.10.0" +taplo = "0.9.3" +typos = "1.28.1" +"ubi:houseabsolute/omegasort" = "v0.1.3" +"ubi:houseabsolute/precious" = "v0.7.3"