build: replace make orchestration with shell

This commit is contained in:
Dandaedre 2026-09-16 01:31:10 +02:00
parent 296f8074d3
commit 9e44a80a3c
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
10 changed files with 26 additions and 55 deletions

2
Jenkinsfile vendored
View File

@ -28,7 +28,7 @@ pipeline {
stage('Test Components and Integration') {
steps {
sh 'make check'
sh 'scripts/check-components.sh'
}
}
}

View File

@ -1,27 +0,0 @@
.PHONY: help bootstrap check analyse draft render all
help:
@echo 'make bootstrap'
@echo 'make check'
@echo 'make analyse CAPTURE=... EVIDENCE_ROOT=... OUTPUT=... REFERENCE_TIME=...'
@echo 'make draft DIAGNOSTIC=... EVIDENCE_ROOT=... OUTPUT_DIR=... TITLE=... AUTHOR=... DATE=...'
@echo 'make render REPORT=... OUTPUT=...'
@echo 'make all CAPTURE=... EVIDENCE_ROOT=... WORK_DIR=... REFERENCE_TIME=... TITLE=... AUTHOR=... DATE=...'
bootstrap:
bash bootstrap.sh
check:
bash scripts/check-components.sh
analyse:
bash scripts/workflow.sh analyse "$(CAPTURE)" "$(EVIDENCE_ROOT)" "$(OUTPUT)" "$(REFERENCE_TIME)"
draft:
bash scripts/workflow.sh draft "$(DIAGNOSTIC)" "$(EVIDENCE_ROOT)" "$(OUTPUT_DIR)" "$(TITLE)" "$(AUTHOR)" "$(DATE)"
render:
bash scripts/workflow.sh render "$(REPORT)" "$(OUTPUT)"
all:
bash scripts/workflow.sh all "$(CAPTURE)" "$(EVIDENCE_ROOT)" "$(WORK_DIR)" "$(REFERENCE_TIME)" "$(TITLE)" "$(AUTHOR)" "$(DATE)"

View File

@ -25,7 +25,7 @@ versions and high-level commands for the complete workflow.
## Requirements
The runtime uses Bash, Git, Make, Typst 0.15 or newer, and Rust/Cargo. Cargo
The runtime uses Bash, Git, Typst 0.15 or newer, and Rust/Cargo. Cargo
installs a small helper used for atomic, no-replace publication.
Selected report fonts must also be installed; the examples use DejaVu Sans and
DejaVu Sans Mono.
@ -52,14 +52,14 @@ Run the complete workflow with an explicit capture, evidence root, and new work
directory:
```bash
make all \
CAPTURE=/path/to/evidence/capture.json \
EVIDENCE_ROOT=/path/to/evidence \
WORK_DIR=/path/to/new-run \
REFERENCE_TIME=2026-09-15T12:00:00Z \
TITLE='Diagnostic review' \
AUTHOR='Reviewer Name' \
DATE=2026-09-15
scripts/workflow.sh all \
/path/to/evidence/capture.json \
/path/to/evidence \
/path/to/new-run \
2026-09-15T12:00:00Z \
'Diagnostic review' \
'Reviewer Name' \
2026-09-15
```
The work directory must not already exist. A successful run creates:
@ -81,13 +81,11 @@ options, and evidence. Existing destinations are never overwritten.
Use the individual stages when a report needs review or editing between steps:
```bash
make analyse CAPTURE=... EVIDENCE_ROOT=... OUTPUT=... REFERENCE_TIME=...
make draft DIAGNOSTIC=... EVIDENCE_ROOT=... OUTPUT_DIR=... TITLE=... AUTHOR=... DATE=...
make render REPORT=... OUTPUT=...
scripts/workflow.sh analyse CAPTURE EVIDENCE_ROOT OUTPUT REFERENCE_TIME
scripts/workflow.sh draft DIAGNOSTIC EVIDENCE_ROOT OUTPUT_DIR TITLE AUTHOR DATE
scripts/workflow.sh render REPORT OUTPUT
```
Run `make help` for the complete command summary.
## Reproducibility
Git submodules pin exact component commits instead of following branch heads.

View File

@ -13,12 +13,12 @@ elif [[ $# -ne 0 ]]; then
fi
missing=()
for command in git make typst cargo; do
for command in git typst cargo; do
command -v "$command" >/dev/null 2>&1 || missing+=("$command")
done
if ((${#missing[@]})); then
echo "Missing required tools: ${missing[*]}" >&2
echo 'Install Git, Make, Typst, and Rust/Cargo, then rerun bootstrap.' >&2
echo 'Install Git, Typst, and Rust/Cargo, then rerun bootstrap.' >&2
exit 1
fi
@ -49,6 +49,6 @@ if $check_only; then
exit 0
fi
make -C reports build
reports/install.sh
echo 'Bootstrap complete. Run make check or make help.'
echo 'Bootstrap complete. Run scripts/check-components.sh to verify the workspace.'

@ -1 +1 @@
Subproject commit 537f77f092d2824f5e079f89597927b2b6a7d7cc
Subproject commit 1fa65558130be2b91bd15a26ba729b7b4c6b787d

View File

@ -16,7 +16,7 @@ and extracted-text checks. Those checks are skipped when Poppler is unavailable.
## Run the complete verification
```bash
make check
scripts/check-components.sh
```
This invokes the component suites and a sanitized capture-to-PDF integration
@ -40,7 +40,7 @@ Before committing an integration change, run:
```bash
./bootstrap.sh --check
make check
scripts/check-components.sh
git diff --check
git submodule status
```

@ -1 +1 @@
Subproject commit 67e3687b50522435b16a25ad2e967dc65d14c93d
Subproject commit b71c168a7f710df1e639d58064b4a3b5f5d5081d

@ -1 +1 @@
Subproject commit b2326bbfacad70e70d21d2890a7b3dc447f0f1ee
Subproject commit f5539cf88f179f5436473f5657cadb41ce54a6d0

6
scripts/check-components.sh Normal file → Executable file
View File

@ -9,7 +9,7 @@ command -v uv >/dev/null 2>&1 || {
}
for component in diagnostics reporter reports; do
if [[ ! -f "$component/requirements.txt" || ! -d "$component/tests" || ! -f "$component/Makefile" ]]; then
if [[ ! -f "$component/requirements.txt" || ! -d "$component/tests" || ! -x "$component/test.sh" ]]; then
echo "Missing $component checks. Run: git submodule update --init --recursive" >&2
exit 1
fi
@ -24,7 +24,7 @@ typst --version
uv --version
for component in diagnostics reporter; do
echo "Checking $component ($(git -C "$component" rev-parse HEAD))"
make -C "$component" test
"$component/test.sh"
done
echo "Checking reports ($(git -C reports rev-parse HEAD))"
@ -33,7 +33,7 @@ REPORT_VALIDATOR="$(pwd)/reporter/tools/validate.sh" \
BRANDING="$(pwd)/reports/config/branding/default.json" \
BRANDING_ROOT="$(pwd)/reports" \
BRANDING_DIRECTORY="$(pwd)/reports/config/branding" \
make -C reports test
reports/test.sh
pipeline_check_parent="$(mktemp -d "${TMPDIR:-/tmp}/beffroi-pipeline-check.XXXXXX")"
trap 'rm -rf -- "$pipeline_check_parent"' EXIT

View File

@ -22,7 +22,7 @@ require_values() {
}
for executable in typst cargo; do command -v "$executable" >/dev/null || { echo "Missing runtime dependency: $executable" >&2; exit 1; }; done
[[ -x reports/.tools/bin/publish-exclusive ]] || make -C reports build
[[ -x reports/.tools/bin/publish-exclusive ]] || reports/install.sh
analyse() {
[[ $# -eq 4 ]] || usage