Allow for feature branches

This commit is contained in:
Chris Hunt 2023-04-03 15:45:58 +01:00
parent 5104a182a2
commit 5e8f854b79
No known key found for this signature in database

View File

@ -9,16 +9,19 @@ EOF
touch base/.nojekyll touch base/.nojekyll
# Generating documentation for each other branch in a subdirectory # 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 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 git checkout $BRANCH
node processing node processing
cp -a public/. process cp -a public/. process
npm run deploy --prefix site npm run deploy --prefix site
cp -a process/. public/ # Have to run it again because the deploy wipes the file and folders out cp -a process/. public/ # Have to run it again because the deploy wipes the file and folders out
rm -rf process rm -rf process
mv public base/$BRANCH mv public base/$SANITIZED_BRANCH
cp base/$BRANCH/favicon.ico base/favicon.ico cp base/$SANITIZED_BRANCH/favicon.ico base/favicon.ico
done done
mv base public mv base public