githooks.toml 811 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. [tasks.install-commitlint.mac]
  2. script = [
  3. """
  4. brew install npm
  5. npm install @commitlint/cli @commitlint/config-conventional --save-dev
  6. git config core.hooksPath .githooks
  7. """,
  8. ]
  9. script_runner = "@shell"
  10. [tasks.install-commitlint.windows]
  11. script = [
  12. """
  13. echo "WIP"
  14. git config core.hooksPath .githooks
  15. """,
  16. ]
  17. script_runner = "@duckscript"
  18. [tasks.install-commitlint.linux]
  19. script = [
  20. """
  21. if command -v apt &> /dev/null
  22. then
  23. echo "Installing node.js (sudo apt install nodejs)"
  24. sudo apt install nodejs
  25. else
  26. echo "Installing node.js (sudo pacman -S nodejs)"
  27. sudo pacman -S nodejs
  28. fi
  29. npm install @commitlint/cli @commitlint/config-conventional --save-dev
  30. git config core.hooksPath .githooks
  31. """,
  32. ]
  33. script_runner = "@shell"