From 71e5bb8aa64df609d3bfd5040bdc9b8256bdf167 Mon Sep 17 00:00:00 2001 From: Leif Madsen Date: Wed, 30 Nov 2022 16:54:47 -0500 Subject: [PATCH 1/2] Build and push documentation for STF 1.5 Update scripts and path references for STF 1.5 so that we can have upstream documentation for this release. Going forward major changes will happen in the main branch in preparation for STF 2.0. It will be good to have a current version of documentation for the stable-1.5 branch which will reference the new release automation changes that provides an upstream nightly build for stable-1.5 in its own index image. --- build_tools/ci.sh | 14 ++++++-------- doc-Service-Telemetry-Framework/Makefile | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/build_tools/ci.sh b/build_tools/ci.sh index 44775009..550eabd5 100755 --- a/build_tools/ci.sh +++ b/build_tools/ci.sh @@ -9,7 +9,7 @@ echo "--- installing dependencies" dnf install findutils git make ruby rubygems -y gem install --no-document --minimal-deps asciidoctor -# get the current working branch, if we're master, we'll end up pushing new docs +# get the current working branch, if we're stable-1.5, we'll end up pushing new docs echo "--- current working branch is $BRANCH" echo "--- building documentation" @@ -40,18 +40,16 @@ mv build/doc-Service-Telemetry-Framework/* ./ mv index-upstream.html index.html rm -rf build/ -# Add everything, get ready for commit. But only do it if we're on -# master. If you want to deploy on different branches, you can change -# this. -if [[ "$BRANCH" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then - echo "Branch is master, so pushing docs to gh-pages" +# Build this for stable-1.5 branch and push custom paths to gh-pages +if [[ "$BRANCH" =~ ^stable-1\.5$ ]]; then + echo "Branch is stable-1.5, so pushing docs to gh-pages" git add --all - git commit -am '[ci skip] publishing updated documentation...' + git commit -am '[ci skip] publishing updated documentation for STF 1.5...' git remote rm origin git remote add origin https://$GH_NAME:$GH_TOKEN@github.com/infrawatch/documentation.git git push origin gh-pages else - echo "Not on master, so won't push doc" + echo "Not on stable-1.5, so won't push doc" fi diff --git a/doc-Service-Telemetry-Framework/Makefile b/doc-Service-Telemetry-Framework/Makefile index 961db74b..d91623ef 100644 --- a/doc-Service-Telemetry-Framework/Makefile +++ b/doc-Service-Telemetry-Framework/Makefile @@ -3,10 +3,10 @@ BUILD_DIR = ../build ROOTDIR = $(realpath .) NAME = $(notdir $(ROOTDIR)) DEST_DIR = $(BUILD_DIR)/$(NAME) -DEST_HTML = $(DEST_DIR)/index-$(BUILD).html -DEST_HTML_170 = $(DEST_DIR)/index-$(BUILD)-170.html -DEST_HTML_162 = $(DEST_DIR)/index-$(BUILD)-162.html -DEST_HTML_13 = $(DEST_DIR)/index-$(BUILD)-13.html +DEST_HTML = $(DEST_DIR)/index-1-5-$(BUILD).html +DEST_HTML_170 = $(DEST_DIR)/index-1-5-$(BUILD)-170.html +DEST_HTML_162 = $(DEST_DIR)/index-1-5-$(BUILD)-162.html +DEST_HTML_13 = $(DEST_DIR)/index-1-5-$(BUILD)-13.html DEST_PDF = $(BUILD_DIR)/$(NAME)-$(BUILD).pdf IMAGES_DIR = $(DEST_DIR)/images IMAGES_TS = $(DEST_DIR)/.timestamp-images From 768f0632f28b403b5f12e244b2f59c5366c30cfd Mon Sep 17 00:00:00 2001 From: Leif Madsen Date: Wed, 30 Nov 2022 16:59:16 -0500 Subject: [PATCH 2/2] Don't attempt to move non-existant file --- build_tools/ci.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build_tools/ci.sh b/build_tools/ci.sh index 550eabd5..dcf5338e 100755 --- a/build_tools/ci.sh +++ b/build_tools/ci.sh @@ -37,7 +37,6 @@ rm -rf images/ echo "--- moving built files into the top-level directory" touch .nojekyll mv build/doc-Service-Telemetry-Framework/* ./ -mv index-upstream.html index.html rm -rf build/ # Build this for stable-1.5 branch and push custom paths to gh-pages