From 1de68a1e35d3ed1aca37ef2ef25952b7cfa8fa50 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 5 Mar 2020 14:43:15 +0100 Subject: initial commit --- s2i/bin/assemble | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 s2i/bin/assemble (limited to 's2i/bin') diff --git a/s2i/bin/assemble b/s2i/bin/assemble new file mode 100755 index 0000000..9436885 --- /dev/null +++ b/s2i/bin/assemble @@ -0,0 +1,32 @@ +#!/bin/bash -e +# +# For more information refer to the documentation: +# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md +# + +source ${0}.pre + +echo "---> Installing application source ..." +rm -rf /tmp/src/.git +mv /tmp/src . + +echo "---> Looking for sphinx config ..." +cfg=$(echo src/[Dd][Oo][Cc]*/conf.py) +if test ! -f "$cfg"; then + cfg="src/conf.py" +fi +if test ! -f "$cfg"; then + cfg=$(find src -name conf.py | sort | head -n 1) +fi +if test ! -f "$cfg"; then + echo "ERROR: no sphinx config found" + exit 1 +fi + +echo "---> Building docs, using $cfg ..." +sphinx-build ${cfg%/conf.py} html + +echo "---> Cleanup ..." +rm -rf src + +source ${0}.post -- cgit