Adds player handbook generation

This commit is contained in:
Dandaedre 2026-07-13 01:42:19 +02:00 committed by Dandaedre
parent baa4c9ef45
commit fde55bfbb3
4 changed files with 52 additions and 10 deletions

4
.gitignore vendored
View File

@ -3,14 +3,10 @@
.last_run.toml
*_build.tex
*.pdf
*.sh
ravenous-tools.exe
Images/Radar/*
gen-*
## Helix
.ignore
## Other ressources
Others/

3
.ignore Normal file
View File

@ -0,0 +1,3 @@
*.png
*.jpg
*.svg

18
Jenkinsfile vendored
View File

@ -7,7 +7,8 @@ pipeline {
================== */
environment {
ORIGIN_FOLDER = "Ravenous_build.pdf"
FULL_BOOK = "Ravenous_build.pdf"
PLYR_BOOK = "Player_handbook_build.pdf"
MDBOOK_BUILD_DIR = "book" // Don't change, it allows the build script & mdBook to know where the book is
DEPLOY_DIR = "/mnt/books/Ravenous" // Important, all books are in /mnt/book
}
@ -46,6 +47,9 @@ pipeline {
sh 'mv ./Ressources/lmroman8-regular.ttf ~/.local/share/fonts/'
sh 'ravenous-tools graphs load'
sh 'ravenous-tools graphs gen'
sh 'ravenous-tools make -N Player_handbook.tex'
sh 'ravenous-tools make -t glossaries Player_handbook.tex'
sh 'ravenous-tools make -N Player_handbook.tex' // Second annoying make for correct references
sh 'ravenous-tools make -N Ravenous.tex'
sh 'ravenous-tools make -t glossaries Ravenous.tex'
sh 'ravenous-tools make -N Ravenous.tex' // Second annoying make for correct references
@ -57,6 +61,9 @@ pipeline {
sh 'mv ./Ressources/lmroman8-regular.ttf ~/.local/share/fonts/'
sh 'ravenous-tools graphs load'
sh 'ravenous-tools graphs gen'
sh 'ravenous-tools make -N Player_handbook.tex'
sh 'ravenous-tools make -t glossaries Player_handbook.tex'
sh 'ravenous-tools make -N Player_handbook.tex' // Second annoying make for correct references
sh 'ravenous-tools make -N Ravenous.tex'
sh 'ravenous-tools make -t glossaries Ravenous.tex'
sh 'ravenous-tools make -N Ravenous.tex' // Second annoying make for correct references
@ -73,15 +80,18 @@ pipeline {
if (env.BRANCH_NAME == 'origin/review' || env.BRANCH_NAME == 'review') {
sh 'echo "Deploying to ${DEPLOY_DIR}_review"'
sh 'mkdir -p ${DEPLOY_DIR}_review'
sh 'rsync -a --delete "${ORIGIN_FOLDER}" "${DEPLOY_DIR}_review/"'
sh 'rsync -a --delete "${FULL_BOOK}" "${DEPLOY_DIR}_review/"'
sh 'rsync -a --delete "${PLYR_BOOK}" "${DEPLOY_DIR}_review/"'
} else if (env.BRANCH_NAME == 'origin/dev-ci' || env.BRANCH_NAME == 'dev-ci') {
sh 'echo "Deploying to ${DEPLOY_DIR}_dev"'
sh 'mkdir -p ${DEPLOY_DIR}_dev'
sh 'rsync -a --delete "${ORIGIN_FOLDER}" "${DEPLOY_DIR}_dev/"'
sh 'rsync -a --delete "${FULL_BOOK}" "${DEPLOY_DIR}_dev/"'
sh 'rsync -a --delete "${PLYR_BOOK}" "${DEPLOY_DIR}_dev/"'
} else if (env.BRANCH_NAME == 'origin/master' || env.BRANCH_NAME == 'master') {
sh 'echo "Deploying to ${DEPLOY_DIR}"'
sh 'mkdir -p ${DEPLOY_DIR}'
sh 'rsync -a --delete "${ORIGIN_FOLDER}" "${DEPLOY_DIR}/"'
sh 'rsync -a --delete "${FULL_BOOK}" "${DEPLOY_DIR}/"'
sh 'rsync -a --delete "${PLYR_BOOK}" "${DEPLOY_DIR}/"'
} else {
echo "Unknown branch: ${env.BRANCH_NAME} — skipping deploy steps."
}

View File

@ -58,7 +58,9 @@ Usage: ./build.sh [--help | <mode>] [make-options …]
Modes:
simple (default) – run a minimal build
full – run all the steps from the original script
clean – clean all build artifacts
player – build the player handbook
full – rerun a full build
Everything that follows the mode is forwarded verbatim to `make` inside
the container.
@ -69,6 +71,14 @@ HELP
MODE=full
shift
;;
--player|player)
MODE=player
shift
;;
--clean|clean)
MODE=clean
shift
;;
*)
# All remaining arguments are passed straight to `make`
MAKE_ARGS+=("$@")
@ -124,13 +134,36 @@ case "$MODE" in
run_podman graphs gen
# Pass user supplied make arguments *before* the target so that options
# like `-j4` or custom targets still work.
# or custom targets still work.
run_podman make "${MAKE_ARGS[@]}" -N Player_handbook.tex
run_podman make -t glossaries -N Player_handbook.tex
run_podman make "${MAKE_ARGS[@]}" -N Player_handbook.tex
run_podman make "${MAKE_ARGS[@]}" -N Ravenous.tex
run_podman make -t glossaries -N Ravenous.tex
run_podman make "${MAKE_ARGS[@]}" -N Ravenous.tex
;;
player)
echo ">>> Executing PLAYER build (with args: ${MAKE_ARGS[@]})..."
run_podman make "${MAKE_ARGS[@]}" -N Player_handbook.tex || exit $?
echo "--- Build Completed Successfully ---"
;;
clean)
echo ">>> Cleaning up directory..."
run_podman make -t clean Player_handbook.tex || exit $?
run_podman make -t clean Ravenous_build.tex || exit $?
run_podman graphs remove || exit $?
rm -f ./Ravenous_build.* ./Player_handbook_build.*
echo "--- Cleanup Completed Successfully ---"
;;
simple)
echo ">>> Executing SIMPLE build (with args: ${MAKE_ARGS[@]})..."