Update building and publishing of docs to gh-pages.
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user