2021-03-08 04:43:36 +03:00
|
|
|
#!/bin/sh
|
2021-04-12 15:55:00 +03:00
|
|
|
|
|
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2021-03-08 04:43:36 +03:00
|
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
|
|
|
2021-04-25 02:39:27 +03:00
|
|
|
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
|
2021-04-23 07:34:54 +03:00
|
|
|
|
2022-02-10 04:11:00 +03:00
|
|
|
if [ -z "$(git diff --name-only tooling/cli.rs/node)" ]; then
|
2021-04-25 02:39:27 +03:00
|
|
|
echo "skipping cli.js - no changes detected"
|
|
|
|
else
|
2022-02-10 04:11:00 +03:00
|
|
|
cd tooling/cli.rs/node
|
2021-04-25 02:39:27 +03:00
|
|
|
yarn format
|
2022-02-10 04:11:00 +03:00
|
|
|
cd ../../..
|
2021-04-25 02:39:27 +03:00
|
|
|
fi
|
2021-04-23 07:34:54 +03:00
|
|
|
|
2021-04-25 02:39:27 +03:00
|
|
|
if [ -z "$(git diff --name-only tooling/create-tauri-app)" ]; then
|
|
|
|
echo "skipping create-tauri-app - no changes detected"
|
|
|
|
else
|
|
|
|
cd tooling/create-tauri-app
|
|
|
|
yarn format
|
|
|
|
yarn lint-fix
|
|
|
|
cd ../..
|
|
|
|
fi
|