From 878c0d3fd17278e81b369da17b2bd15ca6415747 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Apr 17 2019 08:29:05 +0000 Subject: fix publishing bug --- diff --git a/build-scripts/README.md b/build-scripts/README.md index 8acc0ae..f1d819c 100644 --- a/build-scripts/README.md +++ b/build-scripts/README.md @@ -1,7 +1,7 @@ # Building the docs ``` -docker run --rm -it -v $(pwd)/output:/antora/output antora-openshift-rebuild +docker run --rm -it -e "BUILD_ENV=stg" -v $(pwd)/output:/antora/output antora-openshift-rebuild ``` The output will be in `./output/`. diff --git a/build-scripts/rebuild-site.sh b/build-scripts/rebuild-site.sh index 9bcb0b9..d301787 100755 --- a/build-scripts/rebuild-site.sh +++ b/build-scripts/rebuild-site.sh @@ -9,12 +9,17 @@ BUILD_CMD="antora --html-url-extension-style=indexify site.yml" target="/antora" +if [ -z ${BUILD_ENV+x} ]; then + BUILD_ENV="master" +fi + + if ! workdir=$(mktemp -d) ; then echo "Error creating a tempdir. Exiting." exit 1 fi -if ! git clone $SOURCE_REPO "$workdir/source" ; then +if ! git clone --single-branch --branch $BUILD_ENV $SOURCE_REPO "$workdir/source" ; then echo "" echo "Error cloning the source repo." rm -rf "$workdir" @@ -44,10 +49,11 @@ fi popd > /dev/null -rm -rf "$workdir/target/en-US" +#rm -rf "$workdir/target/en-US" +rm -rf "$target/output/en-US" -cp -r "$workdir/source/public/en-US" "$target/output/en-US.building" && mv "$target/output/en-US.building" "$target/output/en-US" -cp "$workdir/source/static/index.html" "$target/output/index.html" +cp -r "$workdir/source/public/en-US" "$target/output/en-US.building" && mv "$target/output/en-US.building" "$target/output/en-US" || exit 1 +cp "$workdir/source/static/index.html" "$target/output/index.html" || exit 1 rm -rf "$workdir" diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..03e5496 --- /dev/null +++ b/static/index.html @@ -0,0 +1,11 @@ + + + + + + + + Continue to the English site.

+ +