polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [06/12] zest-qi4j git commit: Build now skip asciidoc tasks if not installed, except for releases
Date Wed, 22 Jul 2015 14:13:33 GMT
Build now skip asciidoc tasks if not installed, except for releases

Print a warning about installing asciidoc if skipped.
Fail for releases if asciidoc is not installed.
For ZEST-25 to allow build from source distribution without asciidoc.


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/a9e1d99d
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/a9e1d99d
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/a9e1d99d

Branch: refs/heads/develop
Commit: a9e1d99dabae83bbb72f8abaed050005ae7bc2d3
Parents: 64a38cb
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Wed Jul 22 13:57:07 2015 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Wed Jul 22 13:57:07 2015 +0200

----------------------------------------------------------------------
 manual/build.gradle | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/a9e1d99d/manual/build.gradle
----------------------------------------------------------------------
diff --git a/manual/build.gradle b/manual/build.gradle
index b81294e..3d6d8cf 100644
--- a/manual/build.gradle
+++ b/manual/build.gradle
@@ -78,3 +78,16 @@ task manuals() {
 //  dependsOn referenceManual
 //  dependsOn recipes
 }
+
+// Skip if asciidoc is not present when building a 0 or SNAPSHOT version
+[ website, archiveWebsite, copyWebsite, manuals ]*.onlyIf {
+  if( version != '0' && !version.contains( 'SNAPSHOT' ) ) {
+    return true
+  }
+  def pathDirs = System.getenv( 'PATH' ).split( File.pathSeparator )
+  def present = pathDirs.collect( { new File( it, 'asciidoc') } ).flatten().findAll( { it.isFile()
} )
+  if( !present ) {
+    project.logger.warn 'Asciidoc not found, manual tasks will skip, please install http://www.methods.co.nz/asciidoc/'
+  }
+  present
+}


Mime
View raw message