From 4f3b6809513dedbc861b5d9463fecd96b4f0e5e6 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Mon, 2 Feb 2026 01:20:33 +0100 Subject: [PATCH] add build and deploy targets for klausurfragen --- Makefile | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 736aac0..c08275c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # HdM Slides - Unified Makefile # Supports multiple courses: 223015b (Dateiformate) and 223015c (Internettechnik) -.PHONY: help dev dev-b dev-c build build-b build-c pdf html klausur clean install deploy qr optimize-images +.PHONY: help dev dev-b dev-c build build-b build-c pdf html klausur clean install deploy qr optimize-images klausurfragen build-klausurfragen deploy-klausurfragen # Course configuration COURSES = 223015b 223015c @@ -85,7 +85,18 @@ build-b: build/.exists build-c: build/.exists $(call build_course,223015c) -build: build-b build-c +build-klausurfragen: build/.exists + @echo "Building klausurfragen..." + @mkdir -p build + @if [ -f "$(SLIDES_DIR)/klausurfragen.md" ]; then \ + echo " Building klausurfragen.md..."; \ + npx @marp-team/marp-cli "$(SLIDES_DIR)/klausurfragen.md" -o build/klausurfragen.html; \ + npx @marp-team/marp-cli "$(SLIDES_DIR)/klausurfragen.md" --pdf --allow-local-files -o build/klausurfragen.pdf; \ + else \ + echo " Skipping: $(SLIDES_DIR)/klausurfragen.md not found"; \ + fi + +build: build-b build-c build-klausurfragen @echo "All courses built!" # HTML only builds @@ -179,7 +190,7 @@ HDM_DEPLOY_PATH = /home/tengo/html/hdm build-index: build/.exists @echo "Building root index..." - @echo 'HdM Vorlesungen

HdM Vorlesungen

Wintersemester 2025/26 · Michael Czechowski

223015b
Dateiformate, Schnittstellen, Speichermedien & Distributionswege
6 Kapitel · Modul "Technik 1"
223015c
Grundlagen IT- und Internettechnik
3 Kapitel · Modul "Technik 1"

Referenzen

Plattform
Code Crispies
Selbstlernplattform
QR Code

https://librete.ch/hdm/

' > build/index.html + @echo 'HdM Vorlesungen

HdM Vorlesungen

Wintersemester 2025/26 · Michael Czechowski

223015b
Dateiformate, Schnittstellen, Speichermedien & Distributionswege
6 Kapitel · Modul "Technik 1"
223015c
Grundlagen IT- und Internettechnik
3 Kapitel · Modul "Technik 1"
Klausurfragen
Klausurfragen & Übungsfragen
Sammlung von Prüfungsfragen

Referenzen

Plattform
Code Crispies
Selbstlernplattform
QR Code

https://librete.ch/hdm/

' > build/index.html # Deploy define deploy_course @@ -198,13 +209,20 @@ deploy-b: build-b deploy-c: build-c $(call deploy_course,223015c) +# Deploy klausurfragen (root-level page) +deploy-klausurfragen: build-klausurfragen + @echo "Deploying klausurfragen..." + @scp build/klausurfragen.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true + @scp build/klausurfragen.pdf $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true + @echo "klausurfragen deployed!" + deploy-index: build-index @echo "Deploying root index..." scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ scp build/qr-root.svg $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/ 2>/dev/null || true @echo "Root index deployed!" -deploy: build-index deploy-b deploy-c deploy-index +deploy: build-index deploy-b deploy-c deploy-klausurfragen deploy-index @echo "All courses deployed!" # Clean