Skip to content

Commit

Permalink
add ignore-docs-bundle-build
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Sep 14, 2024
1 parent 8197b70 commit 1ec175a
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions scripts/ignore-docs-bundle-build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env sh

if [ "$VERCEL_ENV" == "preview" ]; then
PATH=$(pnpm list --filter=@fern-ui/docs-bundle --depth -1 --json | jq -r '.[].path')

Expand All @@ -7,14 +9,9 @@ if [ "$VERCEL_ENV" == "preview" ]; then

DEPS=$(pnpm list --filter=@fern-ui/docs-bundle --only-projects --prod --recursive --depth=Infinity --json | jq -r '[.. | objects | select(.version | .!=null) | select(.version | startswith("link:")) | .path] | unique | .[]')

if [ -n "$DEPS" ]; then
for DEP in $DEPS; do
if [ "$(git diff --quiet HEAD^ HEAD -- $DEP)" ]; then
exit 1
fi
done
if [ "$(git diff --quiet HEAD^ HEAD -- $PATH)" ]; then
exit 1
fi

else
exit 0
fi

exit 0

0 comments on commit 1ec175a

Please sign in to comment.