diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-10-17 12:46:49 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-10-17 14:05:09 +0000 |
commit | f2adf542e878c96895210f97ebf1ebb763b2f465 (patch) | |
tree | 91fc0faeb3436e723d07aed1f38ce59a6e7cc7c5 /scripts/build_all_branches_in.sh | |
parent | 49071a0d0425ef67fa552dbf14c81e5a11cc49e7 (diff) |
Release ONAP SDKv10.2
Issue-ID: INT-2150
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I650047c599a5aae6de7c6b42d38e34aea88578e2
Diffstat (limited to 'scripts/build_all_branches_in.sh')
-rwxr-xr-x | scripts/build_all_branches_in.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/scripts/build_all_branches_in.sh b/scripts/build_all_branches_in.sh new file mode 100755 index 0000000..3e56ddd --- /dev/null +++ b/scripts/build_all_branches_in.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +INITIAL_FOLDER=${PWD} +INITIAL_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [ -e requirements.txt ] +then + pip install -r requirements.txt +fi +if [ -e doc-requirements.txt ] +then + pip install -r doc-requirements.txt +fi +if [ -e requirements.txt ] +then + pip install . +fi + +set -x +# Generating documentation for each other branch in a subdirectory +for BRANCH in $(git branch --remotes --format '%(refname:lstrip=3)' | grep -Ev '^(HEAD)$'); do + echo "*** Building doc for branch ${BRANCH} ***" + git checkout $BRANCH + cd ${INITIAL_FOLDER}${DOC_PATH} + make html + mkdir -p ${INITIAL_FOLDER}/public/$BRANCH + mv _build/html/ ${INITIAL_FOLDER}/public/$BRANCH + rm -rf _build/html/ + cd ${INITIAL_FOLDER} +done + +# "Develop" is the default branch so we point it as "latest" +# May/Will change to point master +ln public/develop public/latest + +git checkout $INITIAL_BRANCH |