Justfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. all: build test xtests
  2. all-release: build-release test-release xtests-release
  3. # compiles the exa binary
  4. @build:
  5. cargo build
  6. # compiles the exa binary (in release mode)
  7. @build-release:
  8. cargo build --release --verbose
  9. # compiles the exa binary with every combination of feature flags
  10. @build-features:
  11. cargo hack build --feature-powerset
  12. # runs unit tests
  13. @test:
  14. cargo test --all -- --quiet
  15. # runs unit tests (in release mode)
  16. @test-release:
  17. cargo test --release --all --verbose
  18. # runs unit tests with every combination of feature flags
  19. @test-features:
  20. cargo hack test --feature-powerset -- --quiet
  21. # runs extended tests
  22. @xtests:
  23. xtests/run.sh
  24. # runs extended tests (using the release mode exa)
  25. @xtests-release:
  26. xtests/run.sh --release
  27. # lints the code
  28. @clippy:
  29. touch src/main.rs
  30. cargo clippy
  31. # updates dependency versions, and checks for outdated ones
  32. @update-deps:
  33. cargo update
  34. command -v cargo-outdated >/dev/null || (echo "cargo-outdated not installed" && exit 1)
  35. cargo outdated
  36. # lists unused dependencies
  37. @unused-deps:
  38. command -v cargo-udeps >/dev/null || (echo "cargo-udeps not installed" && exit 1)
  39. cargo +nightly udeps
  40. # prints versions of the necessary build tools
  41. @versions:
  42. rustc --version
  43. cargo --version
  44. # builds the man pages
  45. @man:
  46. mkdir -p "${CARGO_TARGET_DIR:-target}/man"
  47. pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
  48. pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
  49. # builds and previews the main man page (exa.1)
  50. @man-1-preview: man
  51. man "${CARGO_TARGET_DIR:-target}/man/exa.1"
  52. # builds and previews the colour configuration man page (exa_colors.5)
  53. @man-5-preview: man
  54. man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"