Skip to content

rig: deploy from the root cph-staging checkout; guard against wrong-branch/dirty builds - #31

Merged
chondl merged 1 commit into
cph-stagingfrom
fix/deploy-dir-root-checkout
Jul 21, 2026
Merged

rig: deploy from the root cph-staging checkout; guard against wrong-branch/dirty builds#31
chondl merged 1 commit into
cph-stagingfrom
fix/deploy-dir-root-checkout

Conversation

@chondl

@chondl chondl commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Why

The checkout layout changed on 2026-07-20: cph-staging became the primary checkout at the repository root, and its dedicated worktree at .worktrees/cph-staging was removed (a branch can only be checked out in one place). That broke the deploy Makefile's default DEPLOY_DIR ?= $(MAIN_DIR)/.worktrees/cph-stagingmake ship/make build failed on a nonexistent path.

What

  • DEPLOY_DIR now defaults to the root checkout (MAIN_DIR), which is the cph-staging branch.
  • New check-deploy-src guard, a prerequisite of build-api/build-web: refuses to build unless the deploy checkout is on cph-staging and has no uncommitted backend//frontend/ changes. This mechanically enforces the project rule that production is always built from committed cph-staging history (every change lands via a PR first), closing the drift class found earlier where production ran an un-pushed local commit.

Verification

  • Guard correctly rejects: a non-cph-staging branch (tested on this PR branch) and DEPLOY_DIR pointed at the cph-master worktree.
  • Pass-case (make check-deploy-src green on clean cph-staging) + live make smoke verified post-merge.

Follow-up to #28 (which repointed deploys at the cph-staging worktree before the worktree was retired).

…ranch/dirty builds

The dedicated .worktrees/cph-staging worktree was retired when cph-staging
became the primary root checkout (2026-07-20), which broke the Makefile's
DEPLOY_DIR default. Point DEPLOY_DIR at the root checkout and add a
check-deploy-src guard so builds refuse to run unless the checkout is on
cph-staging with clean backend/ and frontend/ — production can never silently
drift from branch history.
@chondl
chondl merged commit dc9c54c into cph-staging Jul 21, 2026
@chondl
chondl deleted the fix/deploy-dir-root-checkout branch July 21, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant