You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement Windows autostart fix and self-update feature (#105)
* Implement Windows autostart fix and self-update feature
- Added a new documentation file for the Windows autostart fix specification.
- Enhanced the autostart functionality to handle WindowsApps aliases and improve command-line argument formatting.
- Updated the autostart status command to check if the server process is running and log any startup errors.
- Introduced unit tests for Windows-specific command-line building and path extraction.
- Implemented a self-update command that allows users to check for and apply updates directly from the command line.
- Added error handling and logging improvements during the background process startup.
- Created a new updater package to manage downloading and verifying updates from GitHub.
- Added tests for the updater functionality, including version comparison and checksum verification.
* fix: update .gitignore to include .kimchi and remove obsolete documentation files
* feat: add update command to routatic-proxy for automatic version management
* feat: enhance User-Agent handling in updater for GitHub API requests
* fix: replace ping with timeout for backup deletion in Windows
---------
Signed-off-by: TUYIZERE Samuel <tuyizeres0@gmail.com>
- An [OpenCode Go](https://opencode.ai/auth) subscription and API key
92
92
- Go 1.21+ (only needed if building from source)
93
93
- Docker (only needed for Docker setup)
94
+
95
+
## Updating
96
+
97
+
If you installed via `go install` or downloaded a release binary directly, you can self-update with the built-in command:
98
+
99
+
```bash
100
+
# See whether a newer release is available without changing anything
101
+
routatic-proxy update --check
102
+
103
+
# Download, verify checksum, and replace the running binary in place
104
+
routatic-proxy update
105
+
106
+
# Skip the confirmation prompt (useful in scripts)
107
+
routatic-proxy update --yes
108
+
```
109
+
110
+
The updater queries the [routatic/proxy releases on GitHub](https://github.com/routatic/proxy/releases), picks the asset that matches your OS/arch, verifies its SHA256 against `checksums.txt` when available, and writes a `.old` backup of the previous binary next to the running executable before replacing it. On Windows the `.old` backup is scheduled for deletion after the process exits because the running executable is locked until then.
111
+
112
+
A `dev` build (e.g. when compiled from source without a version tag) refuses to update unless you pass `--force`.
113
+
114
+
If you installed via **Homebrew** (`brew upgrade routatic-proxy`) or **Scoop** (`scoop update routatic-proxy`), prefer your package manager — it tracks the same releases and handles uninstall/reinstall cleanly.
0 commit comments