feat(dev-env): shell scripts (git-hooks, worktree, deploy, regtest, nav) and smoke test
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7960f82494
commit
dbd9e76027
13 changed files with 2496 additions and 0 deletions
24
modules/dev-env/scripts/lib.sh
Normal file
24
modules/dev-env/scripts/lib.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# dev-env — shared config-loader library.
|
||||
#
|
||||
# Installed at /etc/dev-env/lib.sh and sourced by the shell-function
|
||||
# modules (nav / worktree / pr-helpers / regtest). Holds the runtime
|
||||
# config loader that was previously copy-pasted into each module.
|
||||
#
|
||||
# Side-effect-free at top level (function definitions only): it is
|
||||
# sourced into interactive shells and may be re-sourced freely, so it
|
||||
# must stay idempotent and must not clobber the user's environment.
|
||||
# Colours deliberately live in lib-colors.sh (sourced only by the
|
||||
# standalone bins) so they don't leak into interactive shells.
|
||||
|
||||
# Load the rendered runtime config (DEV_ROOT, REPOS_DIR, deploy targets,
|
||||
# …) into the current shell. Safe to call repeatedly.
|
||||
_devenv_source_config() {
|
||||
if [[ -r /etc/dev-env/config.sh ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/dev-env/config.sh
|
||||
fi
|
||||
}
|
||||
|
||||
# Default loader used by the navigation / worktree / PR modules.
|
||||
# regtest.sh overrides this to layer on its own path defaults.
|
||||
_devenv_load_config() { _devenv_source_config; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue