diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
index 1b24768..d525d73 100644
--- a/.github/workflows/makefile.yml
+++ b/.github/workflows/makefile.yml
@@ -13,6 +13,7 @@ jobs:
- uses: actions/checkout@v4
- name: Install tools used in tests
run: |
+ sudo apt install -y just
npm install -g pnpm
- name: Run tests
run: dash run-tests.sh
diff --git a/README.md b/README.md
index d6824e2..84063b4 100644
--- a/README.md
+++ b/README.md
@@ -184,6 +184,7 @@ request.
| Cabal | Haskell | `*.cabal` | `cabal build`
`cabal run`
`cabal test` |
| Stack | Haskell | `stack.yaml` | `stack build`
`stack run`
`stack test` |
| make | Any | `Makefile` | `make`
`make test/check` |
+| just | Any | `justfile` | `just build`
`just run`
`just test` |
| Mage | Go | `magefile.go` with a `test`/`check` target | `mage test/check` |
| Go | Go | `go.mod` | `go test` |
| Tectonic | LaTeX | `Tectonic.toml` | `tectonic -X build` |
diff --git a/man/projectdo.1 b/man/projectdo.1
index a7ed9a2..2719555 100644
--- a/man/projectdo.1
+++ b/man/projectdo.1
@@ -1,5 +1,5 @@
'\" t
-.\" Automatically generated by Pandoc 3.1.13
+.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "projectdo" "1" "April 24, 2024" "projectdo 0.2.2" "User Manual"
.SH NAME
@@ -279,6 +279,21 @@ _
tab(@);
lw(8.4n) lw(10.9n) lw(23.5n) lw(27.2n).
T{
+just
+T}@T{
+Any
+T}@T{
+\f[CR]justfile\f[R]
+T}@T{
+\f[CR]just build\f[R], \f[CR]just run\f[R], \f[CR]just test\f[R]
+T}
+_
+.TE
+.PP
+.TS
+tab(@);
+lw(8.4n) lw(10.9n) lw(23.5n) lw(27.2n).
+T{
make
T}@T{
Any
diff --git a/man/projectdo.1.md b/man/projectdo.1.md
index cd51cd1..49487b5 100644
--- a/man/projectdo.1.md
+++ b/man/projectdo.1.md
@@ -124,6 +124,9 @@ alias p='projectdo tool'
| Stack | Haskell | `stack.yaml` | `stack build`, `stack run`, `stack test` |
|--------------|------------------|---------------------------------------|---------------------------------------------|
+| just | Any | `justfile` | `just build`, `just run`, `just test` |
+|--------------|------------------|---------------------------------------|---------------------------------------------|
+
| make | Any | `Makefile` | `make`, `make test/check` |
|--------------|------------------|---------------------------------------|---------------------------------------------|
diff --git a/projectdo b/projectdo
index c1a2645..e7b2135 100755
--- a/projectdo
+++ b/projectdo
@@ -187,6 +187,18 @@ try_lein() {
fi
}
+# justfile
+
+try_justfile() {
+ if [ -f justfile ]; then
+ if ! has_command "just"; then
+ echo "Found a justfile but 'just' is not installed."
+ exit 1
+ fi
+ execute_command just "$ACTION"
+ fi
+}
+
# Makefile
has_make_target() {
@@ -319,6 +331,7 @@ detect_and_run() {
try_cmake
try_maven
try_lein
+ try_justfile
try_makefile
try_python
try_go
diff --git a/run-tests.sh b/run-tests.sh
old mode 100644
new mode 100755
index d802cbd..83385be
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -163,6 +163,25 @@ if describe "npm / yarn / pnpm"; then
fi
fi
+if describe "just"; then
+ if it "finds test target"; then
+ do_test_in "just"; assert
+ assertEqual "$RUN_RESULT" "just test"
+ fi
+ if it "finds build target"; then
+ do_build_in "just"; assert
+ assertEqual "$RUN_RESULT" "just build"
+ fi
+ if it "finds run target"; then
+ do_run_in "just"; assert
+ assertEqual "$RUN_RESULT" "just run"
+ fi
+ if it "can print tool"; then
+ do_print_tool_in "just"; assert
+ assertEqual "$RUN_RESULT" "just"
+ fi
+fi
+
if describe "make"; then
if it "finds check target"; then
do_test_in "make-check"; assert
diff --git a/tests/just/justfile b/tests/just/justfile
new file mode 100644
index 0000000..e655633
--- /dev/null
+++ b/tests/just/justfile
@@ -0,0 +1,8 @@
+test:
+ @echo "Tests passed"
+
+build:
+ @echo "Built"
+
+run:
+ @echo "Ran"