Skip to content

Conversation

@CalvinAllen
Copy link
Contributor

Summary

Implements the rnr upgrade command to update binaries to the latest version from GitHub releases.

Changes

  • Upgrade command: Checks GitHub API for latest release, compares versions, downloads new binaries for all configured platforms
  • Init command: Now downloads real binaries from GitHub releases (instead of placeholders)
  • Git repo root check: Init now errors if not run from a git repository root
  • Dependencies: Added serde_json for GitHub API parsing, enabled rustls-tls and json features for reqwest

Usage

./rnr upgrade

Output:

Checking for updates...

  Current version: v0.1.0
  Latest version:  v0.2.0

Upgrading to v0.2.0...

  Downloading rnr-linux-amd64... done
  Downloading rnr-macos-arm64... done
  Downloading rnr-windows-amd64.exe... done

Upgrade complete! Now running v0.2.0

Test plan

  • Run cargo test - all tests pass
  • Run cargo clippy - no warnings
  • Test upgrade command with existing rnr setup
  • Test init command errors when not in git repo root

Closes #11

- Add upgrade command to check for and download latest releases from GitHub
- Compare current version with latest release, skip if already up to date
- Download new binaries for all configured platforms
- Update init command to download real binaries from GitHub releases
- Add git repo root check to init (errors if not at root)
- Add serde_json dependency for GitHub API parsing
- Add rustls-tls and json features to reqwest

Closes #11
Init command now requires being at a git repo root, so the
integration tests need to run git init in temp directories
before testing the init command.
Adds --force flag to init command that allows initialization in
directories that aren't git repository roots. Useful for edge cases
or non-git projects.

Also adds integration test to verify the flag works correctly.
No releases exist yet, so init cannot download real binaries.
Building without network feature uses placeholder binaries instead.
@CalvinAllen CalvinAllen merged commit a05e3e9 into main Jan 9, 2026
17 checks passed
@CalvinAllen CalvinAllen deleted the feat/cli/upgrade-command branch January 9, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): implement upgrade command

2 participants