update.sh: rebuild when the build is stale, not just after a pull#16
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the short-circuit change.
update.sh decided whether to rebuild based on whether its own
git pulladvanced HEAD. That misfired when a user rangit pullby 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 whenbuild/index.jsis missing, the marker is absent, or HEAD differs from it. A genuine no-op still short-circuits.--dev, dirty, diverged, and--forcestill always rebuild.No user-facing change; UI version stays v0.72.