Documentation
¶
Overview ¶
Package update probes GitHub for new commits on the bee main branch and applies updates by re-running install.sh in a subprocess.
Used by the TUI background-checker goroutine. Two pieces are deliberately separated:
- Probe — cheap HTTP call, no side effects, safe to run on a timer.
- Apply — spawns the installer subprocess; only invoked from a user decision in the modal.
Index ¶
Constants ¶
const InstallURL = "https://raw.githubusercontent.com/elhenro/bee/main/install.sh"
InstallURL is the canonical curl-piped installer script.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply runs the installer in a subprocess and returns its combined output. The installer auto-detects platform, downloads the latest binary, and installs over the current bee binary. Sudo is required when the install dir isn't writable — this call will FAIL in that case (no tty available inside the TUI), and the caller is expected to surface a "run manually" hint with the same curl command shown in InstallCommand.
func InstallCommand ¶
func InstallCommand() string
InstallCommand returns the shell one-liner the user can paste outside bee when Apply fails (e.g. because /usr/local/bin needs sudo).
Types ¶
type Info ¶
type Info struct {
CurrentSHA string // build-time commit (short or full)
LatestSHA string // full sha of branch HEAD
ShortSHA string // 7-char short of LatestSHA
Ahead int // commits in main not in current
Behind int // commits in current not in main (forks / dirty builds)
Repo string // owner/repo (e.g. elhenro/bee)
Branch string // e.g. main
}
Info describes an update opportunity returned by Probe.