Skip to content

Conversation

@ops295
Copy link
Owner

@ops295 ops295 commented Jan 6, 2026

This PR introduces a self-update command to allow users to easily update the CLI to the latest version directly from their terminal. It also adds developer tooling to streamline release management.

Summary

  • feat(cli): Added self-update command.
    • Checks GitHub Releases for the latest version.
    • Automatically detects OS (macOS/Linux/Windows) and Architecture (amd64/arm64).
    • Downloads and replaces the current binary in-place safely.
  • feat(dev): Added make bump-version target.
    • Usage: make bump-version v=0.2.02
    • Updates version constants in Makefile, main.go, and help.yaml.
  • docs: Updated README.md and help.yaml with instructions for the new command.
  • chore: Updated CHANGELOG.md for v0.2.02.

Checklist

  • I have read CONTRIBUTING.md
  • PR is small and focused
  • Tests (if any) included or updated

Reviewers

Request review from @hashbuzz-social (or other maintainers). I will review first as requested.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds self-update functionality to the journal-cli, enabling users to update the binary directly from GitHub Releases without external package managers. It also introduces developer tooling for version management and comprehensive architecture documentation.

  • Added self-update command that automatically detects OS/architecture and downloads the appropriate binary from GitHub Releases
  • Implemented make bump-version target to streamline version updates across multiple files
  • Added comprehensive architecture documentation including ADRs and feature documentation

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
internal/updater/self_update.go Core self-update logic: queries GitHub API, downloads binary, performs in-place replacement with rollback support
cmd/journal/main.go Integrated self-update subcommand handler before flag parsing
internal/help/help.yaml Updated version to 0.2.02 and added self-update command documentation
internal/help/help.go Added rendering logic for the Updates section in help output
README.md Added Updates section with self-update instructions and documentation links
Makefile Updated VERSION to 0.2.02 and added bump-version target with sed automation
CHANGELOG.md Added changelog entry for version 0.2.02
.gitignore Updated to ignore /journal binary and /bin directory
docs/features/self-update.md New file documenting self-update feature implementation
docs/features/templates.md New file documenting template feature
docs/ARCHITECTURE.md New file providing architecture overview
docs/adr/001-pragmatic-clean-architecture.md New ADR documenting architectural approach
cmd/journal/main.go.bak Backup file that should not be in version control
architecture.md Removed old architecture documentation (replaced by docs/ARCHITECTURE.md)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you.

ops295 and others added 4 commits January 7, 2026 07:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

ops295 and others added 3 commits January 7, 2026 07:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #9, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #10, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 7, 2026

@ops295 I've opened a new pull request, #11, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits January 7, 2026 02:28
Co-authored-by: ops295 <42335697+ops295@users.noreply.github.com>
Co-authored-by: ops295 <42335697+ops295@users.noreply.github.com>
Co-authored-by: ops295 <42335697+ops295@users.noreply.github.com>
Remove backup file from version control
Copilot AI and others added 3 commits January 7, 2026 02:30
Co-authored-by: ops295 <42335697+ops295@users.noreply.github.com>
[WIP] Address feedback on self-update command and version management
Add User-Agent header to GitHub API requests in self-update
@ops295 ops295 merged commit 32642ca into main Jan 7, 2026
9 checks passed
@ops295 ops295 deleted the feature/self-update branch January 7, 2026 02:34
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.

3 participants