Add nerve upgrade command - #48
Merged
Merged
Conversation
Pulls latest source, reinstalls Python deps (uv or pip), and rebuilds the frontend. Supports --no-pull, --no-deps, --no-frontend flags and short-circuits in Docker mode with a hint to use docker compose.
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.
Summary
Adds a new
nerve upgradeCLI command that handles the three standard upgrade steps against the source checkout:git pull --ff-only— refuses non-fast-forward to avoid silent mergesuv pip install -e .whenuvis onPATH, else falls back topython -m pip install -e .npm install && npm run buildinweb/On success, prints a hint to run
nerve restart.Flags
--no-pull— skipgit pull--no-deps— skip Python dependency install--no-frontend— skipnpm install && npm run buildEdge cases handled
docker compose pull && docker compose up -dgit pullinstead of crashing (tarball installs)pyproject.toml— hard error (not a Nerve source checkout)git/npm— actionable error suggesting the corresponding--no-*flagClickExceptionand aborts remaining stepsTest plan
pytest tests/— 368 passed (13 new intest_cli_upgrade.py+ 355 existing)nerve upgrade --helprenders correctlynerve --helplists the new command