Skip to content

Commit cfc08ae

Browse files
committed
fix: LPB_PI_REF is branch name, not version tag
- lpb.stack.env: LPB_PI_REF=lpb-dev (branch for cloning) - CI: bump VERSION only, not LPB_PI_REF - pre-commit: check LPB_PI_REF is branch name - Images tagged with bumped VERSION - Builds clone from branch (stable), tag with version (unique)
1 parent f412bd5 commit cfc08ae

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

.githooks/pre-commit

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ else
3131
fi
3232
echo ""
3333

34-
# 2. Validate lpb.stack.env
34+
# 2. Validate lpb.stack.env LPB_PI_REF is a branch name (not version)
3535
echo "=== Environment Sync ==="
3636
if [ -f "$DEVSTACK_DIR/lpb.stack.env" ]; then
3737
PI_REF=$(grep '^LPB_PI_REF=' "$DEVSTACK_DIR/lpb.stack.env" | cut -d= -f2)
38-
if [ "$PI_REF" != "$CURRENT_VERSION" ]; then
39-
error "lpb.stack.env: LPB_PI_REF=$PI_REF (expected $CURRENT_VERSION)"
40-
sed -i "s/^LPB_PI_REF=.*/LPB_PI_REF=$CURRENT_VERSION/" "$DEVSTACK_DIR/lpb.stack.env"
41-
echo " 🔧 Fixed LPB_PI_REF to $CURRENT_VERSION"
38+
# LPB_PI_REF should be a branch name (lpb, lpb-dev), not a version tag
39+
if echo "$PI_REF" | grep -qE '^(lpb|lpb-dev)$'; then
40+
info "LPB_PI_REF=$PI_REF (branch)"
4241
else
43-
info "LPB_PI_REF=$PI_REF"
42+
error "lpb.stack.env: LPB_PI_REF=$PI_REF (should be branch name: lpb or lpb-dev)"
4443
fi
4544
else
4645
warn "lpb.stack.env not found"

.github/workflows/build-and-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ jobs:
113113
echo "Bumping $VERSION → $NEW_VERSION"
114114
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
115115
116-
# Persist bumped version (excluded from CI paths, won't re-trigger)
116+
# Persist bumped version (VERSION excluded from CI paths, won't re-trigger)
117117
echo "$NEW_VERSION" > VERSION
118-
sed -i "s/^LPB_PI_REF=.*/LPB_PI_REF=$NEW_VERSION/" lpb.stack.env
119118
git config user.name "ci-localpibox"
120119
git config user.email "ci@localpibox.dev"
121-
git add VERSION lpb.stack.env
120+
git add VERSION
122121
git commit -m "chore: bump VERSION $NEW_VERSION" || echo "Nothing to commit"
123122
git commit -m "chore: bump VERSION $NEW_VERSION" || echo "Nothing to commit"
124123
git push origin dev --force-with-lease || echo "Push failed (already up-to-date)"

lpb.stack.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# ─── Pi Monorepo ────────────────────────────────────────────────────────
1414
# Fork URL — cumulative patches on top of earendil-works/pi
1515
LPB_PI_FORK=https://github.com/localpibox/pi.git
16-
# Branch — which branch to build from (the lpb branch is the stable base)
17-
LPB_PI_REF=0.0.31-lpb-dev
16+
# Branch — which branch to build from (lpb-dev for dev, lpb for stable)
17+
LPB_PI_REF=lpb-dev
1818
# Upstream — original repo (for reference / rebasing)
1919
LPB_PI_UPSTREAM=https://github.com/earendil-works/pi.git
2020

0 commit comments

Comments
 (0)