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