refactor: extract set_db_vars and strip_template_block to lib/common.sh
Identical copies of _set_db_vars() and _strip_block() existed in phase1, phase2, and phase8. Moved to lib/common.sh as set_db_vars() and strip_template_block() (public API, no underscore prefix). Removed dead _strip_block definition from phase8 (defined but never called). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,13 +38,6 @@ read -ra REPOS <<< "$REPO_NAMES"
|
||||
PHASE8_STATE_DIR="$(_project_root)/.manifests"
|
||||
PHASE8_STATE_FILE="${PHASE8_STATE_DIR}/phase8_github_repo_state.json"
|
||||
|
||||
# Strip conditional blocks from a rendered file.
|
||||
_strip_block() {
|
||||
local file="$1" start="$2" end="$3"
|
||||
sed -i.bak "/${start}/,/${end}/d" "$file"
|
||||
rm -f "${file}.bak"
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Helper: persist original GitHub repo settings for teardown symmetry
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user