From 797d57e5083a3537132d0865dc7060455d3dc146 Mon Sep 17 00:00:00 2001 From: Brian (bex) Exelbierd Date: Aug 22 2017 10:08:35 +0000 Subject: Add build support for book_branch var and nonbooks --- diff --git a/_distro_map.yml b/_distro_map.yml index bf67ef4..fa5766e 100644 --- a/_distro_map.yml +++ b/_distro_map.yml @@ -12,3 +12,6 @@ fedora: f26-en-US: name: 26 dir: f26 + fedora-budget: + name: Fedora Budget + dir: fedora-budget diff --git a/builder.sh b/builder.sh index 9a290d4..d1b91e1 100755 --- a/builder.sh +++ b/builder.sh @@ -9,51 +9,43 @@ # * Cleanup the publishing branches when we start # * Write a reset script to clean up the repo -BRANCHES="f26 -master" +BRANCHES="master +f26" -BOOKS="install-guide +master_BOOKS="install-guide system-administrators-guide -release-notes" - -DATE=`date` +release-notes +flock2017-docs-workshop" -# clean up old publishing branches -git checkout master -for branch in $BRANCHES; do - git branch -D $branch-en-US -done +f26_BOOKS="install-guide +system-administrators-guide +release-notes" -## Set up base version branches -#for branch in $BRANCHES; do -# git checkout -b $branch -#done +# Nonbooks +# Note: Does not support preprocessors, such as the one used by fedora-budget +# You must manually update _distro_map.yml and index-main.html +NONBOOKS="" -# Set up Common Content -# TODO - Broken -#for branch in $BRANCHES; do -# git checkout $branch -# git subtree add --prefix _Common_Content https://pagure.io/docs-common-content.git master-adoc --squash -#done +DATE=`date` -# First build out en-US +# First build out BOOKS in en-US for lang in "en-US"; do for branch in $BRANCHES; do langbranch=$branch-$lang - -# git checkout $branch git checkout master + git branch -D $langbranch git checkout -b $langbranch # Get books - for book in $BOOKS; do + branch_books=${branch}_BOOKS + for book in ${!branch_books}; do # Book Source into _git dir="fedora-docs/$book" git subtree add --prefix _git/$book https://pagure.io/$dir.git $branch --squash done # Preprocess the books (this ordering prevents having to have a commit in every pass) - for book in $BOOKS; do + for book in ${!branch_books}; do # Link in the baselang to the root directory ln -s _git/$book/en-US $book @@ -73,6 +65,28 @@ for lang in "en-US"; do done done +# Build out non-BOOKS all on master-en-US +for nonbook in $NONBOOKS; do + git checkout master + git branch -D $nonbook + # We need a clean branch for these + git checkout -b $nonbook + git rm -rf . + git add . + git commit -m "Cleared branch $nonbook on $DATE" + branch=master + + # Book Source into _git + git subtree add --prefix _git/$nonbook https://pagure.io/$nonbook.git $branch --squash + cd _git + stow $nonbook + cd .. + + # Commit it all baby - Nonbooks + git add . + git commit -m "Build of $nonbook on $DATE" +done + git checkout master #asciibinder package