Justfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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:
  33. cargo update
  34. cargo outdated
  35. # prints versions of the necessary build tools
  36. @versions:
  37. rustc --version
  38. cargo --version
  39. # builds the man pages
  40. @man:
  41. mkdir -p "${CARGO_TARGET_DIR:-target}/man"
  42. pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
  43. pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
  44. # builds and previews the main man page (exa.1)
  45. @man-1-preview: man
  46. man "${CARGO_TARGET_DIR:-target}/man/exa.1"
  47. # builds and previews the colour configuration man page (exa_colors.5)
  48. @man-5-preview: man
  49. man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"