tldraw/.husky/pre-commit
Lu Wilson 0e7af29085
Fix VS Code commits failing on bublic? (#1680)
This PR should fix commits failing with the VS Code / Github Desktop ui
~~and help steve to stop using "ok" as a commit message~~

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- [internal] fixed commits failing from bublic when using UI
2023-06-30 12:25:16 +00:00

13 lines
407 B
Bash
Executable file

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# if the folder we're in is called bublic, it means we're a submodule in the brivate repo.
# We need to grab .envrc to set up yarn correctly.
current_file="$(readlink -f "$0")"
if [[ $current_file == */bublic/.husky/pre-commit ]]; then
source "$(dirname -- "$0")/../../.envrc"
fi
npx lazy run build-api
git add packages/*/api-report.md
npx lint-staged