version

package
v0.78.4-patch.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(releasesGetterFn ReleasesGetter, currentRelease string) (*semver.Version, error)

Check returns a newer version, or an error or nil for both if no error happened, and no updates are needed.

func GetGithubReleaseURL

func GetGithubReleaseURL(releasesURL string, v *semver.Version) string

func IsUnreleased

func IsUnreleased(version string) bool

IsUnreleased tells if the version in parameter is an unreleased version or not. An unreleased version is a development version from the semantic versioning point of view. This doesn't probe GitHub for its metadata on the version, and this is intended. A release flagged as a pre-release in GitHub is just to mark mainnet incompatibility.

Types

type ReleasesGetter

type ReleasesGetter func() ([]*Version, error)

ReleasesGetter return the list of releases as semantic version strings.

func BuildGithubReleasesRequestFrom

func BuildGithubReleasesRequestFrom(ctx context.Context, releasesURL string) ReleasesGetter

type Version

type Version struct {
	Version       *semver.Version
	IsDraft       bool
	IsDevelopment bool
	IsPreReleased bool
	IsReleased    bool
}

func NewVersionFromString

func NewVersionFromString(release string) (*Version, error)

NewVersionFromString creates a Version and set the appropriate flags on it based on the segments that compose the version.

Jump to

Keyboard shortcuts

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