Skip to content

Commit

Permalink
simple skip build logic for changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hariti committed Nov 11, 2024
1 parent a69c3a1 commit 09fa6ed
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions skip-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ docs_diff_status=$(git diff HEAD^ HEAD --quiet -- docs includes platform-include
# have changes occurred outside of the content directories
non_content_diff_status=$(git diff HEAD^ HEAD --name-only | grep -vE '^(docs/|platform-includes/|includes/|develop-docs/)' | wc -l)

# apps/changelog changes or workspace deps changes (yarn.lock)
changelog_diff_status=$(git diff HEAD^ HEAD --name-only | grep -E '^(apps/changelog/|yarn.lock)' | wc -l)

if [[ "$NEXT_PUBLIC_CHANGELOG" == "1" ]] ; then
if [[ $changelog_diff_status -gt 0 ]] ; then
exit 1
else
exit 0
fi
fi

# always build on changes in non-content related directories
if [[ $non_content_diff_status -gt 0 ]] ; then
exit 1
Expand Down

0 comments on commit 09fa6ed

Please sign in to comment.