Skip to content

update.sh: rebuild when the build is stale, not just after a pull#16

Merged
AsteroidHunter merged 1 commit into
mainfrom
premain
May 26, 2026
Merged

update.sh: rebuild when the build is stale, not just after a pull#16
AsteroidHunter merged 1 commit into
mainfrom
premain

Conversation

@AsteroidHunter
Copy link
Copy Markdown
Owner

Follow-up to the short-circuit change.

update.sh decided whether to rebuild based on whether its own git pull advanced HEAD. That misfired when a user ran git pull by hand first: update.sh's own pull then found nothing new, so it short-circuited and left a stale build.

Now it records the built commit in build/.expediter-built-commit (build/ is gitignored) and rebuilds when build/index.js is missing, the marker is absent, or HEAD differs from it. A genuine no-op still short-circuits. --dev, dirty, diverged, and --force still always rebuild.

No user-facing change; UI version stays v0.72.

Replaced the pull-delta heuristic (rebuild only when update.sh's own pull moved
HEAD) with a build-currency check. After each build, the built commit is written
to build/.expediter-built-commit (build/ is gitignored). A run now rebuilds when
build/index.js is missing, the marker is absent, or HEAD differs from it; it
short-circuits only when the build is genuinely current. Fixes the case where a
manual git pull advanced HEAD with no rebuild in between, which previously
short-circuited and left a stale build. --dev, dirty, diverged, and --force
still always rebuild.
@AsteroidHunter AsteroidHunter merged commit 2b0b716 into main May 26, 2026
1 check passed
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