Merge pull request #18 from berttty/docs
Docs Corrections
diff --git a/.travis.yml b/.travis.yml
index e5868b7..06a946c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,16 @@
# - .autoconf
# - $HOME/.m2
-install: true
+before_install:
+ - if [ -z $(git diff HEAD --name-only | grep "wayang-docs") ] ; then export GENERATE_DOCS="true" ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then sudo apt-get update ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then sudo apt-get -y install ruby-full build-essential zlib1g-dev ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then source ~/.bashrc ; fi
+install:
+ - if [ "${GENERATE_DOS}" = "true" ] ; then gem install jekyll bundler ; fi
+
before_script:
- mkdir -p travis/tmp
- echo "#" >> travis/wayang.properties
@@ -62,7 +71,9 @@
- cat travis/wayang.properties
- rm -rf /home/travis/build/apache/incubator-wayang/target/rat.txt || echo "file doesn't exist"
- rm -rf result.log || echo "file doesn't exist"
- - mvn_opts=("-Dorg.slf4j.simpleLogger.defaultLogLevel=error" "-Dwayang.configuration=file://$(pwd)/travis/wayang.properties" "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=error" "-Dlog4j.rootLogger=ERROR")
+ - export LOG_LEVEL=error
+ - mvn_opts=("-Dorg.slf4j.simpleLogger.defaultLogLevel=${LOG_LEVEL}" "-Dwayang.configuration=file://$(pwd)/travis/wayang.properties" "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=${LOG_LEVEL}" "-Dlog4j.rootLogger=${LOG_LEVEL}")
+ - if [ "${GENERATE_DOS}" = "true" ] ; then mvn_opts=(${mvn_opts[@]} "-Pweb-documentation") ; fi
# - chmod +x ./docs/script/cibuild
script:
#- jdk_switcher use openjdk8
@@ -72,4 +83,9 @@
after_success:
# generate the documentation and create a update of the documentation if something change there
- - if [ -z $(git diff HEAD --name-only | grep "wayang-docs") ] ; then mvn gem:exec@generate-documentation gem:exec@generate-documentation-as-latest site:site -pl wayang-docs ; fi
+ - if [ "${GENERATE_DOS}" = "true" ] ; then mvn gem:exec@generate-documentation gem:exec@generate-documentation-as-latest site:site -pl wayang-docs -Pweb-documentation ; fi
+
+env:
+ global:
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
+ - GENERATE_DOCS=false
diff --git a/pom.xml b/pom.xml
index 2e86bd7..73d3bde 100644
--- a/pom.xml
+++ b/pom.xml
@@ -214,6 +214,12 @@
</build>
</profile>
+ <profile>
+ <id>web-documentation</id>
+ <modules>
+ <module>wayang-docs</module>
+ </modules>
+ </profile>
<profile>
<!-- Perform steps to deploy Wayang. -->
@@ -1165,6 +1171,5 @@
<module>wayang-profiler</module>
<module>wayang-extensions</module>
<module>wayang-resources</module>
- <module>wayang-docs</module>
</modules>
</project>
diff --git a/wayang-docs/pom.xml b/wayang-docs/pom.xml
index 0430bcf..52e59b1 100644
--- a/wayang-docs/pom.xml
+++ b/wayang-docs/pom.xml
@@ -47,10 +47,10 @@
<goal>exec</goal>
</goals>
<configuration>
- <file>${user.home}/.gem/bin/bundle</file>
- <execArgs>install --gemfile=src/main/resources/Gemfile</execArgs>
+ <file>${env.GEM_HOME}/bin/bundle</file>
+ <execArgs>install --gemfile=${project.basedir}/src/main/resources/Gemfile</execArgs>
</configuration>
- <phase>compile</phase>
+ <phase>generate-resources</phase>
</execution>
<execution>
<id>generate-documentation</id>
@@ -59,7 +59,7 @@
</goals>
<phase>generate-resources</phase>
<configuration>
- <file>${user.home}/.gem/bin/jekyll</file>
+ <file>${env.GEM_HOME}/bin/jekyll</file>
<execArgs>build --trace --source ${project.basedir}/src/main/resources --destination ${project.build.outputDirectory}/site/website/docs/${project.version}</execArgs>
</configuration>
</execution>
@@ -70,7 +70,7 @@
</goals>
<phase>generate-resources</phase>
<configuration>
- <file>${user.home}/.gem/bin/jekyll</file>
+ <file>${env.GEM_HOME}/bin/jekyll</file>
<execArgs>build --trace --source ${project.basedir}/src/main/resources --destination ${project.build.outputDirectory}/site/website/docs/latest</execArgs>
</configuration>
</execution>
@@ -81,15 +81,15 @@
<goal>exec</goal>
</goals>
<configuration>
- <file>${user.home}/.gem/bin/jekyll</file>
+ <file>${env.GEM_HOME}/bin/jekyll</file>
<execArgs>serve --trace --source ${project.basedir}/src/main/resources --destination ${project.build.outputDirectory}</execArgs>
</configuration>
<phase>none</phase>
</execution>
</executions>
<configuration>
- <gemHome>${user.home}/.gem/</gemHome>
- <gemPath>${user.home}/.gem/</gemPath>
+ <gemHome>${env.GEM_HOME}/</gemHome>
+ <gemPath>${env.GEM_HOME}/</gemPath>
<supportNative>true</supportNative>
<jrubyVersion>9.2.5.0</jrubyVersion>
<addProjectClasspath>true</addProjectClasspath>