diff --git a/Jenkinsfile b/Jenkinsfile index d1fda88..7e4df6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,7 @@ pipeline { environment { FULL_BOOK = "Ravenous_build.pdf" PLYR_BOOK = "Player_handbook_build.pdf" + PLYR_BOOK = "Master_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 } @@ -40,37 +41,29 @@ pipeline { stage('Build Book') { steps { script { - if (env.BRANCH_NAME == 'origin/review' || env.BRANCH_NAME == 'review' || env.BRANCH_NAME == 'origin/dev-ci' || env.BRANCH_NAME == 'dev-ci') { - sh 'echo "Deploying to ${DEPLOY_DIR}_review"' - sh 'ravenous-tools tablegen -e all' - sh 'mkdir -p ~/.local/share/fonts/' - sh 'mkdir -p ./Images/Radar/' - 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 - } else if (env.BRANCH_NAME == 'origin/master' || env.BRANCH_NAME == 'master') { - sh 'echo "Deploying to ${DEPLOY_DIR}"' - sh 'ravenous-tools tablegen -e all' - sh 'mkdir -p ~/.local/share/fonts/' - sh 'mkdir -p ./Images/Radar/' - 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 + + // ---------------------------------------------------- + // Branch lookup – feel free to add more names if needed. + // ---------------------------------------------------- + def reviewBranches = ['origin/review', 'review', + 'origin/dev-ci','dev-ci'] + def masterBranches = ['origin/master', 'master'] + + // Decide which deployment directory we should use + def targetDir + if (reviewBranches.contains(env.BRANCH_NAME)) { + targetDir = "${DEPLOY_DIR}_review" + } else if (masterBranches.contains(env.BRANCH_NAME)) { + targetDir = DEPLOY_DIR } else { echo "Unknown branch: ${env.BRANCH_NAME} — skipping build." + return // exit the script block early } + + // ---------------------------------------------------- + // Run all of the shared steps with the selected dir + // ---------------------------------------------------- + runBuild(targetDir) } } } @@ -81,16 +74,22 @@ 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 'qpdf --encrypt billy billy 40 -- --allow-weak-crypto ${MSTR_BOOK}$ enc_${MSTR_BOOK}$' + sh 'rsync -a --delete "enc_${MSTR_BOOK}" "${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 'qpdf --encrypt billy billy 40 -- --allow-weak-crypto ${MSTR_BOOK}$ enc_${MSTR_BOOK}$' + sh 'rsync -a --delete "enc_${MSTR_BOOK}" "${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 "enc_${MSTR_BOOK}" "${DEPLOY_DIR}/"' + sh 'rsync -a --delete "${FULL_BOOK}" "${DEPLOY_DIR}/"' sh 'rsync -a --delete "${FULL_BOOK}" "${DEPLOY_DIR}/"' sh 'rsync -a --delete "${PLYR_BOOK}" "${DEPLOY_DIR}/"' } else { @@ -115,3 +114,35 @@ pipeline { } } } + +/** + * All commands that were duplicated in the original script. + * + * @param deployDir The directory that will receive the output files. + */ +def runBuild(String deployDir) { + sh "echo \"Deploying to ${deployDir}\"" + sh 'ravenous-tools tablegen -e all' + + // Create the directories needed for fonts / radar images + sh 'mkdir -p ~/.local/share/fonts/' + sh 'mkdir -p ./Images/Radar/' + + // Move the font into place (only needs doing once) + sh 'mv ./Ressources/lmroman8-regular.ttf ~/.local/share/fonts/' + + // Load and generate graphs + sh 'ravenous-tools graphs load' + sh 'ravenous-tools graphs gen' + + /* Build each of the three TeX documents twice – once for a + normal build, once to make sure the glossary / cross‑refs + are correctly updated. */ + ['Player_handbook.tex', + 'Master_handbook.tex', + 'Ravenous.tex'].each { texFile -> + sh "ravenous-tools make -N ${texFile}" + sh "ravenous-tools make -t glossaries ${texFile}" + sh "ravenous-tools make -N ${texFile}" // second build for correct references + } +} diff --git a/Master_handbook.tex b/Master_handbook.tex new file mode 100644 index 0000000..6df387b --- /dev/null +++ b/Master_handbook.tex @@ -0,0 +1,68 @@ + +\documentclass[11pt,a4paper,]{book} + +\input{Misc/Setup.tex} + +\begin{document} +\pagestyle{plain} + +\begin{titlepage} % titre + \begin{center} + \vspace*{4cm} + \Huge\textbf{RAVENOUS}\\ + \LARGE + Livre du joueur\\ + \vfill + \LARGE + Par Le Dandaedre + \end{center} + \end{titlepage} + +\tableofcontents + +\chapter*{\Ravenous} % credits +\input{Chapters/Intro} +\newpage +\vfill +Voici ci-dessous le tableau comportant la légende utilisée pour les fiches de créatures. + +\vfill +\begin{tblr}{ + vspan=even, hspan=minimal, + colspec={X[-1,c] X[0.1] X[1.7,c] X[2,c] X[8] X[20,j]}, + colsep=2pt, + row{2-Z}={font=\footnotesize}, + rowspec={X[b]}, + hlines={white}, +} + \SetCell{c} \rb{HSE} & \SetColumn{font=\tiny} & \SetCell{c} \rb{Trigram (intent)} & \SetCell{c} \rb{Targeting (S/Z/A)} & Catégorie d'action & Description \\ + \hline + \SetHline{1}{0pt} + 0 & \SetCell{bg=ravred} & ATK & - & Attaque & \\ + 0 & \SetCell{bg=ravred} & MVT & - & Mouvement & \\ + 0 & \SetCell{bg=ravred} & DEF & - & Defense & \\ + 0 & \SetCell{bg=ravred} & REV & - & Revival & Retour à la vie d'une créature. \\ + 1 & \SetCell{bg=ravred} & TRA & Z & Thrashing & Dégâts non-intentionels. \\ + 2 & \SetCell{bg=ravred} & STA & - & Stance & Posture identifiable visuellement, permettant et/ou restraignant des actions spécifiques. Peut impacter les stats (seuils). \\ + 4 & \SetCell{bg=ravred} & CMB & S & Combo & Attaques successives (interrompues par une défense intégrale). \\ + 5 & \SetCell{bg=ravred} & ASE & S/Z & Attaque --- Setup & Attaque générant un effet ou une ressource utilisable par d'autres actions. \\ + 9 & \SetCell{bg=ravred} & TBU & S & Tank buster & Attaque extrêmement puissante visant à tuer un ennemi blindé. \\ + 10 & \SetCell{bg=ravred}& TBZ & Z & Tank buster Zone & Même chose, mais en zone. \\ + 4 & \SetCell{bg=ravred} & CLV & Z & Cleave & Attaque à zone d'effet physique esquivable ou interruptible. \\ + 4 & \SetCell{bg=ravred} & AOE & Z & AoE élémentaire & Attaque à zone d'effet élémentaire esquivable ou résistable. \\ + 4 & \SetCell{bg=ravred} & WID & A & Raid-wide & Attaque affectant toute l'équipe en dépit de la distance et du positionnel. \\ + 9 & \SetCell{bg=ravred} & WIP & A & Raid wipe & Raid-wide extrêmement puissant. Suceptible de tuer toute l'équipe. \\ + 8 & \SetCell{bg=ravred} & SZO & - & Setup --- Zone & {Mutation de l'environnement à effet définitif. \\ Génère un effet ou une ressource utilisable par d'autres actions.} \\ + 6 & \SetCell{bg=ravred} & SIT & - & Setup --- Interruptible & Préparation interruptible donnant accès à une attaque méga-puissante. \\ + 16 & \SetCell{bg=ravred} & HRG & A & Hard enrage & Fin du combat. Multiples raid wipes, tank busters insurvivables, etc. \\ + 8 & \SetCell{bg=ravred} & SRG & - & Soft enrage & Modificateur définitif augmentant graduellement la difficulté du combat. \\ + 16 & \SetCell{bg=ravred} & CLM & - & Culmination & Retour à la vie d'une calamité mineure. \\ + 5 & \SetCell{bg=ravred} & GRB & S & Saisie & Ataque visant à saisir une cible. \\ +\end{tblr} + +\vfill + +\newpage +\input{Bestiaire/fullbestiaire.tex} + +\end{document} diff --git a/Player_handbook.tex b/Player_handbook.tex index ae84be4..b7edb87 100644 --- a/Player_handbook.tex +++ b/Player_handbook.tex @@ -19,6 +19,9 @@ \tableofcontents +\chapter*{\Ravenous} % credits +\input{Chapters/Intro} + \chapter{Introduction} \fluff{ Hem. Heu. Rmhmmhm! Ah, euh, oui... hem... bonjour! @@ -574,6 +577,9 @@ Dans ce livre, vous trouverez à portée de main toutes les ressources nécéssa \input{Craft/sec-traps.tex} \vfill +\chapter{Bestiaire} +\input{Chapters/Bestiaire} + \chapter{Écoles de combat} \newpage \input{Ecoles/SpecialisteArmesLourdes.tex} @@ -607,4 +613,5 @@ Dans ce livre, vous trouverez à portée de main toutes les ressources nécéssa \newpage \input{Ecoles/Sangremage.tex} + \end{document}