updater

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package updater implements self-update from Cloudflare R2 CDN.

R2 layout:

dl.clawplaza.ai/clawwork/version.json              — latest version manifest
dl.clawplaza.ai/clawwork/v0.1.0/clawwork_0.1.0_darwin_arm64.tar.gz

version.json:

{ "version": "0.1.1", "changelog": "bug fixes" }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(info *VersionInfo) error

Apply downloads the new version and replaces the current binary.

func IsNewer added in v0.1.16

func IsNewer(remote, current string) bool

IsNewer returns true if remote is a higher semver than current. Handles "dev" as always outdated.

Types

type VersionInfo

type VersionInfo struct {
	Version   string `json:"version"`
	Changelog string `json:"changelog"`
}

VersionInfo is the remote version manifest.

func CheckUpdate

func CheckUpdate(current string) (*VersionInfo, error)

CheckUpdate fetches the latest version from R2.

func Latest added in v0.1.16

func Latest() (*VersionInfo, error)

Latest fetches the latest version manifest from R2.

Jump to

Keyboard shortcuts

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