pre-commit 524 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. # Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  3. # SPDX-License-Identifier: Apache-2.0
  4. # SPDX-License-Identifier: MIT
  5. . "$(dirname "$0")/_/husky.sh"
  6. if [ -z "$(git diff --name-only tooling/api)" ]; then
  7. echo "skipping api - no changes detected"
  8. else
  9. cd tooling/api
  10. yarn format
  11. yarn lint-fix
  12. cd ../..
  13. fi
  14. if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
  15. echo "skipping \`@tauri-apps/cli\` - no changes detected"
  16. else
  17. cd tooling/cli/node
  18. yarn format
  19. cd ../../..
  20. fi