From 9e44a80a3ce9af8fcb4ed7b53e0a82fb6d408efb Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Wed, 16 Sep 2026 01:31:10 +0200 Subject: [PATCH] build: replace make orchestration with shell --- Jenkinsfile | 2 +- Makefile | 27 --------------------------- README.md | 26 ++++++++++++-------------- bootstrap.sh | 8 ++++---- diagnostics | 2 +- docs/development.md | 4 ++-- reporter | 2 +- reports | 2 +- scripts/check-components.sh | 6 +++--- scripts/workflow.sh | 2 +- 10 files changed, 26 insertions(+), 55 deletions(-) delete mode 100644 Makefile mode change 100644 => 100755 scripts/check-components.sh diff --git a/Jenkinsfile b/Jenkinsfile index 30598c6..c0508d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,7 +28,7 @@ pipeline { stage('Test Components and Integration') { steps { - sh 'make check' + sh 'scripts/check-components.sh' } } } diff --git a/Makefile b/Makefile deleted file mode 100644 index 7e72d94..0000000 --- a/Makefile +++ /dev/null @@ -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)" diff --git a/README.md b/README.md index aa7163f..d1d2b8f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/bootstrap.sh b/bootstrap.sh index 5df2060..ca495d9 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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.' diff --git a/diagnostics b/diagnostics index 537f77f..1fa6555 160000 --- a/diagnostics +++ b/diagnostics @@ -1 +1 @@ -Subproject commit 537f77f092d2824f5e079f89597927b2b6a7d7cc +Subproject commit 1fa65558130be2b91bd15a26ba729b7b4c6b787d diff --git a/docs/development.md b/docs/development.md index bf7989f..7ee57df 100644 --- a/docs/development.md +++ b/docs/development.md @@ -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 ``` diff --git a/reporter b/reporter index 67e3687..b71c168 160000 --- a/reporter +++ b/reporter @@ -1 +1 @@ -Subproject commit 67e3687b50522435b16a25ad2e967dc65d14c93d +Subproject commit b71c168a7f710df1e639d58064b4a3b5f5d5081d diff --git a/reports b/reports index b2326bb..f5539cf 160000 --- a/reports +++ b/reports @@ -1 +1 @@ -Subproject commit b2326bbfacad70e70d21d2890a7b3dc447f0f1ee +Subproject commit f5539cf88f179f5436473f5657cadb41ce54a6d0 diff --git a/scripts/check-components.sh b/scripts/check-components.sh old mode 100644 new mode 100755 index d1a9877..adcefa2 --- a/scripts/check-components.sh +++ b/scripts/check-components.sh @@ -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 diff --git a/scripts/workflow.sh b/scripts/workflow.sh index 4f2e4af..4a82509 100755 --- a/scripts/workflow.sh +++ b/scripts/workflow.sh @@ -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