Makefile: "publish-book" target combines both books (#1306)

Since both books share the same Git branch and the same base URL, it
makes sense to combine them when publishing.
This commit is contained in:
Ștefan Talpalaru 2020-07-13 12:46:42 +02:00 committed by GitHub
parent 80cba4db91
commit b01be646cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 18 deletions

View File

@ -224,10 +224,18 @@ book:
cd docs/the_nimbus_book && \
mdbook build
publish-book: | book
auditors-book:
cd docs/the_auditors_handbook && \
mdbook build
publish-book: | book auditors-book
git branch -D gh-pages && \
git branch --track gh-pages origin/gh-pages && \
git worktree add tmp-book gh-pages && \
rm -rf tmp-book/* && \
mkdir -p tmp-book/auditors-book && \
cp -a docs/the_nimbus_book/book/* tmp-book/ && \
cp -a docs/the_auditors_handbook/book/* tmp-book/auditors-book/ && \
cd tmp-book && \
git add . && { \
git commit -m "make publish-book" && \
@ -236,21 +244,4 @@ publish-book: | book
git worktree remove -f tmp-book && \
rm -rf tmp-book
auditors-book:
cd docs/the_auditors_handbook && \
mdbook build
publish-auditors-book: | auditors-book
git worktree add tmp-book gh-pages && \
mkdir -p tmp-book/auditors-book && \
rm -rf tmp-book/auditors-book/* && \
cp -a docs/the_auditors_handbook/book/* tmp-book/auditors-book/ && \
cd tmp-book && \
git add . && { \
git commit -m "make publish-auditors-book" && \
git push origin gh-pages || true; } && \
cd .. && \
git worktree remove -f tmp-book && \
rm -rf tmp-book
endif # "variables.mk" was not included