1
0

Justfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. all: build test
  2. all-release: build-release test-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. # lints the code
  22. @clippy:
  23. touch src/main.rs
  24. cargo clippy
  25. # updates dependency versions, and checks for outdated ones
  26. @update:
  27. cargo update
  28. cargo outdated
  29. # prints versions of the necessary build tools
  30. @versions:
  31. rustc --version
  32. cargo --version
  33. # builds the man pages
  34. @man:
  35. mkdir -p "${CARGO_TARGET_DIR:-target}/man"
  36. pandoc --standalone -f markdown -t man man/exa.1.md > "${CARGO_TARGET_DIR:-target}/man/exa.1"
  37. pandoc --standalone -f markdown -t man man/exa_colors.5.md > "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"
  38. # builds and previews the main man page (exa.1)
  39. @man-1-preview: man
  40. man "${CARGO_TARGET_DIR:-target}/man/exa.1"
  41. # builds and previews the colour configuration man page (exa_colors.5)
  42. @man-5-preview: man
  43. man "${CARGO_TARGET_DIR:-target}/man/exa_colors.5"