From 7077e0b69db20853beff7b310f8d694aca5ca890 Mon Sep 17 00:00:00 2001 From: Mattt Zmuda Date: Mon, 16 Nov 2026 04:02:54 -0800 Subject: [PATCH] Replace the Makefile with mise tasks --- .github/workflows/ci.yml | 2 +- Makefile | 13 ------------- README.md | 11 ++++++----- mise.toml | 26 ++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 19 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f900c18..001c32f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: with: persist-credentials: false - uses: jdx/mise-action@b44d12e7d0d8ee7461bb893e1b1993500433185b # v5.2.7 - - run: make check + - run: mise run check diff --git a/Makefile b/Makefile deleted file mode 100644 index a2129e1..0000000 --- a/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -.PHONY: build test lint check - -build: - go build -o bin/plonge ./cmd/plonge - -test: - gotestsum --format pkgname -- ./... - -lint: - @out="$$(gofmt -l .)"; if [ -n "$$out" ]; then echo "gofmt needed:"; echo "$$out"; exit 1; fi - go vet ./... - -check: lint test diff --git a/README.md b/README.md index aafb7c1..226b98a 100644 --- a/README.md +++ b/README.md @@ -281,16 +281,17 @@ Add it to `~/.claude/settings.json`: ## Development -The repository pins its tools in `mise.toml`. +The repository pins its tools and defines its tasks in `mise.toml`. ```console mise install -mise exec -- make check +mise run check ``` -`make build` writes `bin/plonge`. -`make lint` runs `gofmt -l` and `go vet`. -`make test` runs the tests with gotestsum. +`mise run build` writes `bin/plonge`. +`mise run lint` runs `gofmt -l` and `go vet`. +`mise run test` runs the tests with gotestsum. +`mise run check` runs `lint` and `test`. ## License diff --git a/mise.toml b/mise.toml index a5824c7..64e768d 100644 --- a/mise.toml +++ b/mise.toml @@ -1,3 +1,29 @@ [tools] go = "1.26.10" "aqua:gotestyourself/gotestsum" = "1.13.0" + +[tasks.build] +description = "Build bin/plonge" +run = "go build -o bin/plonge ./cmd/plonge" + +[tasks.lint] +description = "Check formatting with gofmt and run go vet" +run = [ + ''' +out="$(gofmt -l .)" +if [ -n "$out" ]; then + echo "gofmt needed:" + echo "$out" + exit 1 +fi +''', + "go vet ./...", +] + +[tasks.test] +description = "Run the tests with gotestsum" +run = "gotestsum --format pkgname -- ./..." + +[tasks.check] +description = "Run lint and test" +depends = ["lint", "test"]