Update building and publishing of docs to gh-pages.

This commit is contained in:
Scott Frederick
2017-10-31 14:22:52 -05:00
parent b9aa0998c5
commit 76c87cea36
2 changed files with 10 additions and 7 deletions

View File

@@ -3,8 +3,12 @@ buildscript {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3'
}
}
apply plugin: "org.asciidoctor.gradle.asciidoctor"
apply plugin: "org.asciidoctor.convert"
asciidoctor {
sourceDir = file('src/main/asciidoc')
}

View File

@@ -7,8 +7,8 @@ if ! (git remote set-branches --add origin gh-pages && git fetch -q); then
exit 0
fi
if ! [ -d docs/target/generated-docs ]; then
echo "No gh-pages sources in docs/target/generated-docs, so not syncing"
if ! [ -d docs/build/asciidoc/html5 ]; then
echo "No gh-pages sources in docs/build/asciidoc/html5, so not syncing"
exit 0
fi
@@ -22,8 +22,8 @@ if [ "$dirty" != "0" ]; then git stash; fi
###################################################################
git checkout gh-pages
for f in docs/target/generated-docs/*; do
file=${f#docs/target/generated-docs/*}
for f in docs/build/asciidoc/html5/*; do
file=${f#docs/build/asciidoc/html5/*}
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
# Not ignored...
cp -rf $f .
@@ -44,4 +44,3 @@ git checkout master
if [ "$dirty" != "0" ]; then git stash pop; fi
exit 0