Skip to content

Commit a3a481a

Browse files
committed
[doc/builder] Cleanup irrelevant pages updates
1 parent 5b89c16 commit a3a481a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

build-api-reference

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,15 @@ env PHP_VERSION=7.2 phpdoc gen:pages --docs-root ${DOC_ROOT} --template class.md
1919

2020
# Build table of contents
2121
env PHP_VERSION=7.2 phpdoc gen:index --docs-root ${DOC_ROOT} --template index.md.twig --namespace Yannoff\\Component\\Console --exclude Yannoff\\Component\\Console\\Tests\\Command\\HelloCommand --exclude Yannoff\\Component\\Console\\Internal\\Version
22+
23+
# Cleanup irrelevant updates
24+
modified=( $(git status --porcelain ${DOC_ROOT} | awk '{ print $2; }') )
25+
for f in "${modified[@]}"
26+
do
27+
# A 2-lines minimal diff means only generation date has changed
28+
if [ "$(git min-diff $f | wc -l)" -eq "2" ]
29+
then
30+
echo -e "\033[01;30m-> Checking out file: $f\033[00m"
31+
git checkout $f
32+
fi
33+
done

0 commit comments

Comments
 (0)