diff --git a/.gitignore b/.gitignore index f1a2a2c..fcc0ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,14 +3,10 @@ .last_run.toml *_build.tex *.pdf -*.sh ravenous-tools.exe Images/Radar/* gen-* -## Helix -.ignore - ## Other ressources Others/ diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..1876a15 --- /dev/null +++ b/.ignore @@ -0,0 +1,3 @@ +*.png +*.jpg +*.svg diff --git a/Jenkinsfile b/Jenkinsfile index 176fd6b..489d732 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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." } diff --git a/build.sh b/build.sh index 364e3a4..fb77378 100755 --- a/build.sh +++ b/build.sh @@ -58,7 +58,9 @@ Usage: ./build.sh [--help | ] [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[@]})..."