From 5e8f854b79ceaf8ce3e127c4031f3342ba178d58 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Mon, 3 Apr 2023 15:45:58 +0100 Subject: [PATCH] Allow for feature branches --- build_all_branches.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build_all_branches.sh b/build_all_branches.sh index 619c46d..0b2eeff 100755 --- a/build_all_branches.sh +++ b/build_all_branches.sh @@ -9,16 +9,19 @@ EOF touch base/.nojekyll # Generating documentation for each other branch in a subdirectory +echo "All branches:" +echo "$(git branch --remotes --format '%(refname:lstrip=3)' | grep -Ev '^(HEAD|develop|gh-pages)$')" for BRANCH in $(git branch --remotes --format '%(refname:lstrip=3)' | grep -Ev '^(HEAD|develop|gh-pages)$'); do - echo "$BRANCH" >> base/versions.txt + SANITIZED_BRANCH="$(echo $BRANCH | sed 's/\//_/g')" + echo "$SANITIZED_BRANCH" >> base/versions.txt git checkout $BRANCH node processing cp -a public/. process npm run deploy --prefix site cp -a process/. public/ # Have to run it again because the deploy wipes the file and folders out rm -rf process - mv public base/$BRANCH - cp base/$BRANCH/favicon.ico base/favicon.ico + mv public base/$SANITIZED_BRANCH + cp base/$SANITIZED_BRANCH/favicon.ico base/favicon.ico done mv base public