[PR #171] [MERGED] Add 'upgrade' command and automatic updates. #306

Closed
opened 2026-03-02 04:13:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/git-ai-project/git-ai/pull/171
Author: @mm-zacharydavison
Created: 10/30/2025
Status: Merged
Merged: 11/9/2025
Merged by: @svarlamov

Base: mainHead: zachary/automatic-updates


📝 Commits (10+)

  • c5cb0be Add 'upgrade' command and automatic updates.
  • 4ad175c Better message.
  • 63c0309 Merge branch 'main' into zachary/automatic-updates
  • 5590870 fix import in stats_delta.rs
  • a7ccaab auto update functionality
  • 69a1e80 fix invocation of spawned bg procs
  • 39ae7d0 only print upgrade notice when in interactive term
  • 9209322 print version notice cleanup
  • bbf3c10 fix config handling in install scripts
  • 9019dbe Merge branch 'main' into zachary/automatic-updates

📊 Changes

17 files changed (+999 additions, -27 deletions)

View changed files

📝 .github/workflows/release.yml (+3 -0)
📝 Cargo.lock (+92 -0)
📝 Cargo.toml (+2 -0)
📝 docs/enterprise-configuration.mdx (+17 -1)
📝 install.ps1 (+62 -6)
📝 install.sh (+16 -9)
📝 src/commands/git_ai_handlers.rs (+8 -1)
📝 src/commands/hooks/fetch_hooks.rs (+3 -0)
📝 src/commands/hooks/push_hooks.rs (+3 -0)
📝 src/commands/mod.rs (+2 -0)
📝 src/commands/stats_delta.rs (+5 -4)
src/commands/upgrade.rs (+676 -0)
📝 src/config.rs (+74 -0)
📝 src/observability/mod.rs (+1 -1)
📝 src/utils.rs (+28 -0)
📝 tests/amend.rs (+0 -1)
📝 tests/initial_attributions.rs (+7 -4)

📄 Description

Resolves https://github.com/acunniffe/git-ai/issues/87

Adds support for release channels (latest, next) per #198

git-ai upgrade              // checks for updates and upgrades if there is a new version
git-ai upgrade --force      // force re-installs the latest version

Hooks on fetch and push run automated version checks in background processes. Unless auto updates are disabled, it will automatically update as well.

If an update is available and auto updates are disabled, it will print:

A new version of git-ai is available: (1.1.2) → (1.1.3)
Run 'git-ai upgrade' to upgrade to the latest version.

git-ai upgrade delegates to the existing install.sh or install.ps1 script.

  • Install testing
  • Config testing
  • Automated check/install testing
  • Update install scripts to stop overwriting config if it already exists (both windows and bash)
  • Windows testing or temporarily disable on Windows

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/git-ai-project/git-ai/pull/171 **Author:** [@mm-zacharydavison](https://github.com/mm-zacharydavison) **Created:** 10/30/2025 **Status:** ✅ Merged **Merged:** 11/9/2025 **Merged by:** [@svarlamov](https://github.com/svarlamov) **Base:** `main` ← **Head:** `zachary/automatic-updates` --- ### 📝 Commits (10+) - [`c5cb0be`](https://github.com/git-ai-project/git-ai/commit/c5cb0bead3f06554057b26fd4373525aed274cb0) Add 'upgrade' command and automatic updates. - [`4ad175c`](https://github.com/git-ai-project/git-ai/commit/4ad175c526ef7c31e5d51eaecd2ccd333f25996c) Better message. - [`63c0309`](https://github.com/git-ai-project/git-ai/commit/63c0309329d4b30a9fa20fa77121828c8b191dd0) Merge branch 'main' into zachary/automatic-updates - [`5590870`](https://github.com/git-ai-project/git-ai/commit/55908707f0a09dffa176783088b0c0dc6e5e4762) fix import in stats_delta.rs - [`a7ccaab`](https://github.com/git-ai-project/git-ai/commit/a7ccaab36afedb0018480432638c87dc9970e573) auto update functionality - [`69a1e80`](https://github.com/git-ai-project/git-ai/commit/69a1e80f1795133eeebc391599dc5e55b67036c2) fix invocation of spawned bg procs - [`39ae7d0`](https://github.com/git-ai-project/git-ai/commit/39ae7d03b764348a7640b485b9362ac080a92533) only print upgrade notice when in interactive term - [`9209322`](https://github.com/git-ai-project/git-ai/commit/9209322110fe510f537027113cf0fd5078c91194) print version notice cleanup - [`bbf3c10`](https://github.com/git-ai-project/git-ai/commit/bbf3c1045ed58b6adcfae55204ee3d499ad884c5) fix config handling in install scripts - [`9019dbe`](https://github.com/git-ai-project/git-ai/commit/9019dbed6414c3114895ee3fd2aadb12b531f765) Merge branch 'main' into zachary/automatic-updates ### 📊 Changes **17 files changed** (+999 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+3 -0) 📝 `Cargo.lock` (+92 -0) 📝 `Cargo.toml` (+2 -0) 📝 `docs/enterprise-configuration.mdx` (+17 -1) 📝 `install.ps1` (+62 -6) 📝 `install.sh` (+16 -9) 📝 `src/commands/git_ai_handlers.rs` (+8 -1) 📝 `src/commands/hooks/fetch_hooks.rs` (+3 -0) 📝 `src/commands/hooks/push_hooks.rs` (+3 -0) 📝 `src/commands/mod.rs` (+2 -0) 📝 `src/commands/stats_delta.rs` (+5 -4) ➕ `src/commands/upgrade.rs` (+676 -0) 📝 `src/config.rs` (+74 -0) 📝 `src/observability/mod.rs` (+1 -1) 📝 `src/utils.rs` (+28 -0) 📝 `tests/amend.rs` (+0 -1) 📝 `tests/initial_attributions.rs` (+7 -4) </details> ### 📄 Description Resolves https://github.com/acunniffe/git-ai/issues/87 Adds support for release channels (`latest`, `next`) per #198 ``` git-ai upgrade // checks for updates and upgrades if there is a new version git-ai upgrade --force // force re-installs the latest version ``` Hooks on fetch and push run automated version checks in background processes. Unless auto updates are disabled, it will automatically update as well. If an update is available and auto updates are disabled, it will print: ``` A new version of git-ai is available: (1.1.2) → (1.1.3) Run 'git-ai upgrade' to upgrade to the latest version. ``` `git-ai upgrade` delegates to the existing `install.sh` or `install.ps1` script. - [x] Install testing - [x] Config testing - [x] Automated check/install testing - [x] Update install scripts to stop overwriting config if it already exists (both windows and bash) - [ ] Windows testing or temporarily disable on Windows --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:13:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#306
No description provided.