Skip to content

Commit 46f55f4

Browse files
committed
skip changelog builds on related source code chnage
1 parent ffd842a commit 46f55f4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

skip-build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ docs_diff_status=$(git diff HEAD^ HEAD --quiet -- docs includes platform-include
1414
# have changes occurred outside of the content directories
1515
non_content_diff_status=$(git diff HEAD^ HEAD --name-only | grep -vE '^(docs/|platform-includes/|includes/|develop-docs/)' | wc -l)
1616

17+
# apps/changelog changes or workspace deps changes (yarn.lock)
18+
changelog_diff_status=$(git diff HEAD^ HEAD --name-only | grep -vE '^(apps/changelog/|yarn.lock)' | wc -l)
19+
20+
if [[ "$NEXT_PUBLIC_CHANGELOG" === "1" ]] ; then
21+
if [[ $changelog_diff_status -gt 0 ]] ; then
22+
exit 1
23+
else
24+
exit 0
25+
fi
26+
fi
27+
1728
# always build on changes in non-content related directories
1829
if [[ $non_content_diff_status -gt 0 ]] ; then
1930
exit 1

0 commit comments

Comments
 (0)