fix commit hash when publishing book (#6097)
Before, the commit hash was taken from the `gh-pages` branch, instead from the branch used to publish the book.
This commit is contained in:
parent
ed1ef19bf4
commit
e1aa9e6de5
3
Makefile
3
Makefile
|
@ -853,6 +853,7 @@ publish-book: | book auditors-book
|
||||||
if [[ "$${CURRENT_BRANCH}" != "stable" && "$${CURRENT_BRANCH}" != "unstable" ]]; then \
|
if [[ "$${CURRENT_BRANCH}" != "stable" && "$${CURRENT_BRANCH}" != "unstable" ]]; then \
|
||||||
echo -e "\nWarning: you're publishing the books from a branch that is neither 'stable' nor 'unstable'!\n"; \
|
echo -e "\nWarning: you're publishing the books from a branch that is neither 'stable' nor 'unstable'!\n"; \
|
||||||
fi
|
fi
|
||||||
|
CURRENT_COMMIT="$$(git rev-parse --short HEAD)" && \
|
||||||
git branch -D gh-pages && \
|
git branch -D gh-pages && \
|
||||||
git branch --track gh-pages origin/gh-pages && \
|
git branch --track gh-pages origin/gh-pages && \
|
||||||
git worktree add tmp-book gh-pages && \
|
git worktree add tmp-book gh-pages && \
|
||||||
|
@ -863,7 +864,7 @@ publish-book: | book auditors-book
|
||||||
cp -a docs/the_auditors_handbook/book/* tmp-book/auditors-book/ && \
|
cp -a docs/the_auditors_handbook/book/* tmp-book/auditors-book/ && \
|
||||||
cd tmp-book && \
|
cd tmp-book && \
|
||||||
git add . && { \
|
git add . && { \
|
||||||
git commit -m "make publish-book $$(git rev-parse --short HEAD)" && \
|
git commit -m "make publish-book $${CURRENT_COMMIT}" && \
|
||||||
git push origin gh-pages || true; } && \
|
git push origin gh-pages || true; } && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
git worktree remove -f tmp-book && \
|
git worktree remove -f tmp-book && \
|
||||||
|
|
Loading…
Reference in New Issue