update

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
	Size               int64  `json:"size"`
}

Asset represents a downloadable file attached to a release.

type Release

type Release struct {
	TagName     string    `json:"tag_name"`
	Name        string    `json:"name"`
	Draft       bool      `json:"draft"`
	Prerelease  bool      `json:"prerelease"`
	Assets      []Asset   `json:"assets"`
	Body        string    `json:"body"`
	PublishedAt time.Time `json:"published_at"`
}

Release represents a GitHub release with metadata and assets.

func FetchLatestDevRelease

func FetchLatestDevRelease(ctx context.Context, apiBase, owner, repo string) (*Release, error)

FetchLatestDevRelease fetches all releases from GitHub and returns the highest version development release (containing "-dev-" in the tag). It handles pagination to ensure all releases are checked.

func FetchLatestRelease

func FetchLatestRelease(ctx context.Context, apiBase, owner, repo, channel string) (*Release, error)

FetchLatestRelease dispatches to the appropriate fetch function based on the specified channel ("stable" or "dev").

func FetchLatestStableRelease

func FetchLatestStableRelease(ctx context.Context, apiBase, owner, repo string) (*Release, error)

FetchLatestStableRelease fetches the latest stable (non-prerelease) release from GitHub's /releases/latest endpoint.

Jump to

Keyboard shortcuts

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