Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ci/jenkins/bin/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
test -z "${ATS_MAKE}" && ATS_MAKE="make"
test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src"

# Skip if nothing in doc has changed
INCLUDE_FILES=$(for i in $(git grep literalinclude doc/ | awk '{print $3}'); do basename $i; done | sort -u | paste -sd\|)
echo $INCLUDE_FILES
if [ ! -z "$ghprbActualCommit" ]; then
git diff ${ghprbActualCommit}^...${ghprbActualCommit} --name-only | egrep -E "(^doc/|$INCLUDE_FILES)" > /dev/null
if [ $? = 1 ]; then
echo "No relevant files changed, skipping run"
exit 0
fi
fi

# Run configure on the docs builds each time in case there have been updates
autoreconf -fi && ./configure --enable-docs || exit 1

Expand All @@ -30,7 +41,7 @@ rm -rf docbuild/html
${ATS_MAKE} -e SPHINXOPTS="-D language='en'" html
[ $? != 0 ] && exit 1

# Only continue with the rsync and JA build if we're on the official docs updates.
# Only continue with the rsync and JA build if we're on the official docs updates
[ -w /home/docs ] || exit 0

/usr/bin/rsync --delete -av docbuild/html/ /home/docs/en/${ATS_BRANCH}
Expand Down