updater

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAndExtractRelease

func DownloadAndExtractRelease(releaseURL, platform, arch string) (string, error)

DownloadAndExtractRelease downloads a release archive (or uses a direct asset URL) and extracts it to a temporary directory. It returns the extraction directory on success. If releaseURL is empty, the latest release of the current project is used. platform/arch can be used to select the correct asset (e.g. "linux", "amd64").

func GetNightlyReleaseAPIURL

func GetNightlyReleaseAPIURL() string

GetNightlyReleaseAPIURL returns the nightly release API URL for the production repo.

func GetProdReleaseAPIURL

func GetProdReleaseAPIURL() string

GetProdReleaseAPIURL returns the production release API URL (upstream).

func GetReleaseAPIURL

func GetReleaseAPIURL(owner string) string

GetReleaseAPIURL returns the GitHub Releases API URL for the given repo owner. Example: owner="sky5454" -> https://api.github.com/repos/sky5454/picoclaw/releases/latest

func GetReleaseTagAPIURL

func GetReleaseTagAPIURL(owner, tag string) string

GetReleaseTagAPIURL returns the GitHub Releases API URL for a specific tag. Example: owner="sipeed", tag="nightly" -> https://api.github.com/repos/sipeed/picoclaw/releases/tags/nightly

func NewUpdateCommand

func NewUpdateCommand(binaryName string) *cobra.Command

NewUpdateCommand returns a cobra command that triggers UpdateSelfFromRelease.

func UpdateSelf

func UpdateSelf(programName string) error

UpdateSelf updates the running executable by fetching the latest release and applying the binary matching programName.

func UpdateSelfFromRelease

func UpdateSelfFromRelease(releaseURL, platform, arch, programName string) error

UpdateSelfFromRelease downloads the release matching the given parameters, extracts it and applies the binary named programName to update the currently running executable using minio/selfupdate. If releaseURL is empty, the latest release is used. If platform or arch is empty, runtime values are used.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL