tauri/.husky/pre-commit

25 lines
524 B
Plaintext
Raw Normal View History

#!/bin/sh
2021-04-12 15:55:00 +03:00
2023-02-19 16:17:49 +03:00
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2021-04-12 15:55:00 +03:00
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT
. "$(dirname "$0")/_/husky.sh"
if [ -z "$(git diff --name-only tooling/api)" ]; then
echo "skipping api - no changes detected"
else
cd tooling/api
yarn format
yarn lint-fix
cd ../..
fi
if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
echo "skipping \`@tauri-apps/cli\` - no changes detected"
else
cd tooling/cli/node
yarn format
cd ../../..
fi