From 813924460dcbcd34ab4b3b3906829af939c6de64 Mon Sep 17 00:00:00 2001 From: Matteo Cherubini Date: Fri, 12 Jun 2026 12:16:17 +0200 Subject: [PATCH 1/3] feat: Improve pre-commit hook installation robustness --- lib/scaffold.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/scaffold.sh b/lib/scaffold.sh index 8c1e3a7..330d53a 100644 --- a/lib/scaffold.sh +++ b/lib/scaffold.sh @@ -64,8 +64,11 @@ scaffold_genome() { install_precommit_hook() { local repo_path="$1" - local hook_path="${repo_path}/.git/hooks/pre-commit" + local hooks_dir + hooks_dir="$(git -C "$repo_path" rev-parse --git-path hooks)" + local hook_path="${hooks_dir}/pre-commit" + mkdir -p "$hooks_dir" cp "${TEMPLATES_DIR}/pre-commit.sh" "$hook_path" chmod +x "$hook_path" success "Pre-commit security hook installed at: $hook_path" From eeafddbf1ad696fa6046690a23e8f85f31371ab9 Mon Sep 17 00:00:00 2001 From: Matteo Cherubini Date: Fri, 12 Jun 2026 12:16:17 +0200 Subject: [PATCH 2/3] feat: Automatically register new genomes as submodules --- scripts/setup-genomes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/setup-genomes.sh b/scripts/setup-genomes.sh index 354ab12..a2d8c77 100644 --- a/scripts/setup-genomes.sh +++ b/scripts/setup-genomes.sh @@ -40,6 +40,8 @@ for entry in "${GENOMES[@]}"; do cd "${GENOME_NAME}" + git switch -C main + # IMPORTANT: Initialize git-crypt BEFORE creating any files gcrypt_init @@ -50,10 +52,13 @@ for entry in "${GENOMES[@]}"; do git add . git commit -m "feat: initial scaffold and git-crypt init for ${GENOME_NAME}" - git branch -M main - git push -u origin main + cd "${WORK_DIR}/${MASTER_REPO}" + git add .gitmodules "${GENOME_NAME}" + git commit -m "chore: register submodule ${GENOME_NAME}" + git push + # Key export and instructions gcrypt_export_key "${GENOME_NAME}" gcrypt_print_key_instructions "${GENOME_NAME}" From 3e8af163c0670db2d5fc35886b4a524fe9318a39 Mon Sep 17 00:00:00 2001 From: Matteo Cherubini Date: Fri, 12 Jun 2026 12:17:11 +0200 Subject: [PATCH 3/3] Update version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index af1f923..1d8010e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # ============================================================================= -# Knowledge Genome - Makefile v. 1.2.1 +# Knowledge Genome - Makefile v. 1.2.2 # Orchestrates the setup and management of the knowledge base. # =============================================================================