Compare commits
5 commits
c81b7e4185
...
58147ae99c
| Author | SHA1 | Date | |
|---|---|---|---|
| 58147ae99c | |||
| 3e8af163c0 | |||
| eeafddbf1a | |||
| 813924460d | |||
| ec7d3b89cd |
3 changed files with 12 additions and 4 deletions
2
Makefile
2
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.
|
# Orchestrates the setup and management of the knowledge base.
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,11 @@ scaffold_genome() {
|
||||||
|
|
||||||
install_precommit_hook() {
|
install_precommit_hook() {
|
||||||
local repo_path="$1"
|
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"
|
cp "${TEMPLATES_DIR}/pre-commit.sh" "$hook_path"
|
||||||
chmod +x "$hook_path"
|
chmod +x "$hook_path"
|
||||||
success "Pre-commit security hook installed at: $hook_path"
|
success "Pre-commit security hook installed at: $hook_path"
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ for entry in "${GENOMES[@]}"; do
|
||||||
|
|
||||||
cd "${GENOME_NAME}"
|
cd "${GENOME_NAME}"
|
||||||
|
|
||||||
|
git switch -C main
|
||||||
|
|
||||||
# IMPORTANT: Initialize git-crypt BEFORE creating any files
|
# IMPORTANT: Initialize git-crypt BEFORE creating any files
|
||||||
gcrypt_init
|
gcrypt_init
|
||||||
|
|
||||||
|
|
@ -50,10 +52,13 @@ for entry in "${GENOMES[@]}"; do
|
||||||
git add .
|
git add .
|
||||||
git commit -m "feat: initial scaffold and git-crypt init for ${GENOME_NAME}"
|
git commit -m "feat: initial scaffold and git-crypt init for ${GENOME_NAME}"
|
||||||
|
|
||||||
git branch -M main
|
|
||||||
|
|
||||||
git push -u origin 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
|
# Key export and instructions
|
||||||
gcrypt_export_key "${GENOME_NAME}"
|
gcrypt_export_key "${GENOME_NAME}"
|
||||||
gcrypt_print_key_instructions "${GENOME_NAME}"
|
gcrypt_print_key_instructions "${GENOME_NAME}"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue