Skip to content

Commit

Permalink
🪟 🔧 Improve performance of precommit hook (#6387)
Browse files Browse the repository at this point in the history
Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>
  • Loading branch information
timroes and josephkmh committed May 5, 2023
1 parent fef011d commit e3d1ccb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion airbyte-webapp/.githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Find the airbyte-webapp folder (which might be either inside oss/ or on the root)
webappDir="$(dirname "$(find . -wholename '*/airbyte-webapp/package.json')")"
if [ -d "./oss/airbyte-webapp" ]; then
webappDir="./oss/airbyte-webapp"
else
webappDir="./airbyte-webapp"
fi

if [ -z "$(git diff --stat --staged "$webappDir")" ]; then
# There are no staged changes in the webapp folder, so we can skip the rest of this hook
exit 0
Expand Down

0 comments on commit e3d1ccb

Please sign in to comment.