From 2daee7ec2d59e6f71bba2d5b9f83f931d5ff16da Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 21 Jun 2026 08:48:39 +0200 Subject: [PATCH] fix extract traces --- scripts/extract-traces.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/extract-traces.ts b/scripts/extract-traces.ts index b9a968a..a473fe0 100644 --- a/scripts/extract-traces.ts +++ b/scripts/extract-traces.ts @@ -36,6 +36,10 @@ interface TracesData { }; } +// Repo root, derived from this script's location (scripts/ -> repo root). +// Must NOT be hardcoded to a developer's machine, or CI checkouts see no files. +const BASE_DIR = path.resolve(import.meta.dir, ".."); + const TRACES_PATTERN = /TRACES:\s*([^\n]+)/gi; const REQ_ID_PATTERN = /([A-Z]{2})-(\d{3})/g; @@ -45,7 +49,7 @@ function extractRequirementIds(tracesString: string): string[] { } function getAllSourceFiles(): string[] { - const baseDir = "/home/dtourolle/Development/JellyTau"; + const baseDir = BASE_DIR; const patterns = ["src", "src-tauri/src"]; const files: string[] = []; @@ -101,7 +105,7 @@ function extractTraces(): TracesData { }; let totalTraces = 0; - const baseDir = "/home/dtourolle/Development/JellyTau"; + const baseDir = BASE_DIR; const files = getAllSourceFiles();