Skip to content

Commit dcff981

Browse files
committed
hooks: simplify pre-commit — validation only, no cross-repo sync
1 parent 35a0bb2 commit dcff981

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

.githooks/pre-commit

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,19 @@ declare -a REPOS=(
3030
"/home/lpb/.pi/agent/git/github.com/localpibox/pi-subagents"
3131
)
3232

33-
check_repo_version() {
34-
local repo_path="$1"
35-
local repo_name="$2"
36-
[ -d "$repo_path" ] || return 0
37-
[ -f "$repo_path/VERSION" ] || return 0
38-
local repo_version
39-
repo_version=$(cat "$repo_path/VERSION")
40-
if [ "$repo_version" != "$CURRENT_VERSION" ]; then
41-
error "$repo_name: VERSION=$repo_version (expected $CURRENT_VERSION)"
42-
else
43-
info "$repo_name: $repo_version"
44-
fi
45-
}
46-
4733
SETTINGS_JSON="/home/lpb/.pi/agent/settings.json"
4834

4935
info() { echo "$*"; }
5036
warn() { echo " ⚠️ $*"; }
5137
error() { echo "$*"; ERRORS=$((ERRORS + 1)); }
5238

53-
# 1. Validate VERSION file format
39+
# 1. Validate VERSION file format (devstack only)
5440
echo "=== Stack Version ==="
5541
if echo "$CURRENT_VERSION" | grep -qE '^0\.[0-9]+\.[0-9]+-lpb$'; then
5642
info "VERSION=$CURRENT_VERSION (valid)"
5743
else
5844
error "VERSION='$CURRENT_VERSION' does not match 0.x.y-lpb format"
5945
fi
60-
61-
# 2. Validate lpb.stack.env
6246
echo ""
6347
echo "=== Environment Sync ==="
6448
if [ -f "$DEVSTACK_DIR/lpb.stack.env" ]; then

0 commit comments

Comments
 (0)