From 76c87cea365d8a46ec66794d5d957edc243cc3e7 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Tue, 31 Oct 2017 14:22:52 -0500 Subject: [PATCH] Update building and publishing of docs to gh-pages. --- docs/build.gradle | 8 ++++++-- ghpages.sh | 9 ++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/build.gradle b/docs/build.gradle index bb3e9a9..f077f72 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -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') +} diff --git a/ghpages.sh b/ghpages.sh index ed03e6e..3686127 100755 --- a/ghpages.sh +++ b/ghpages.sh @@ -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 -