Documentation
¶
Index ¶
- func GetReleaseNotes(tagVersion string, noColour bool) string
- func IsValidTag(tagVersion string) (bool, error)
- type SemanticVersion
- func GetLatestNightly() (result *SemanticVersion, err error)
- func GetLatestPreRelease() (result *SemanticVersion, err error)
- func GetLatestStableRelease() (result *SemanticVersion, err error)
- func GetVersionTags() ([]*SemanticVersion, error)
- func NewSemanticVersion(version string) (*SemanticVersion, error)
- func (s *SemanticVersion) IsGreaterThan(version *SemanticVersion) (bool, error)
- func (s *SemanticVersion) IsGreaterThanOrEqual(version *SemanticVersion) (bool, error)
- func (s *SemanticVersion) IsHotfix() bool
- func (s *SemanticVersion) IsNightly() bool
- func (s *SemanticVersion) IsPreRelease() bool
- func (s *SemanticVersion) IsRelease() bool
- func (s *SemanticVersion) IsWeekly() bool
- func (s *SemanticVersion) MainVersion() *SemanticVersion
- func (s *SemanticVersion) String() string
- type SemverCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReleaseNotes ¶
func IsValidTag ¶
IsValidTag returns true if the given string is a valid tag
Types ¶
type SemanticVersion ¶
SemanticVersion is a struct containing a semantic version
func GetLatestNightly ¶
func GetLatestNightly() (result *SemanticVersion, err error)
GetLatestNightly gets the newest nightly pre-release (vX.Y.0-nightly.DATE).
func GetLatestPreRelease ¶
func GetLatestPreRelease() (result *SemanticVersion, err error)
GetLatestPreRelease gets the newest build of any kind (nightly, weekly, hotfix or legacy beta/rc).
func GetLatestStableRelease ¶
func GetLatestStableRelease() (result *SemanticVersion, err error)
GetLatestStableRelease gets the newest non-prerelease tag: a weekly (vX.Y.0) or a hotfix (vX.Y.Z). This is exactly what Go resolves "@latest" to.
func GetVersionTags ¶
func GetVersionTags() ([]*SemanticVersion, error)
GetVersionTags gets the v3 release tags of the Wails repo, sorted in descending semver order. It pages through the tags API (100 per page, up to 10 pages) and ignores tags that are not v3 semver tags (v2.*, stray tags).
func NewSemanticVersion ¶
func NewSemanticVersion(version string) (*SemanticVersion, error)
NewSemanticVersion creates a new SemanticVersion object with the given version string
func (*SemanticVersion) IsGreaterThan ¶
func (s *SemanticVersion) IsGreaterThan(version *SemanticVersion) (bool, error)
IsGreaterThan returns true if this version is greater than the given version
func (*SemanticVersion) IsGreaterThanOrEqual ¶
func (s *SemanticVersion) IsGreaterThanOrEqual(version *SemanticVersion) (bool, error)
IsGreaterThanOrEqual returns true if this version is greater than or equal the given version
func (*SemanticVersion) IsHotfix ¶
func (s *SemanticVersion) IsHotfix() bool
IsHotfix returns true for a hotfix release (vX.Y.Z, Z > 0, no suffix).
func (*SemanticVersion) IsNightly ¶
func (s *SemanticVersion) IsNightly() bool
IsNightly returns true for a nightly pre-release (vX.Y.0-nightly.DATE[.N]).
func (*SemanticVersion) IsPreRelease ¶
func (s *SemanticVersion) IsPreRelease() bool
IsPreRelease returns true if it's a prerelease version
func (*SemanticVersion) IsRelease ¶
func (s *SemanticVersion) IsRelease() bool
IsRelease returns true if it's a release version
func (*SemanticVersion) IsWeekly ¶
func (s *SemanticVersion) IsWeekly() bool
IsWeekly returns true for a weekly release (vX.Y.0, no suffix). Minor numbers advance with time, not features.
func (*SemanticVersion) MainVersion ¶
func (s *SemanticVersion) MainVersion() *SemanticVersion
MainVersion returns the main version of any version+prerelease+metadata EG: MainVersion("1.2.3-pre") => "1.2.3"
func (*SemanticVersion) String ¶
func (s *SemanticVersion) String() string
type SemverCollection ¶
type SemverCollection []*SemanticVersion
SemverCollection is a collection of SemanticVersion objects
func (SemverCollection) Len ¶
func (c SemverCollection) Len() int
Len returns the length of a collection. The number of Version instances on the slice.
func (SemverCollection) Less ¶
func (c SemverCollection) Less(i, j int) bool
Less is needed for the sort interface to compare two Version objects on the slice. If checks if one is less than the other.
func (SemverCollection) Swap ¶
func (c SemverCollection) Swap(i, j int)
Swap is needed for the sort interface to replace the Version objects at two different positions in the slice.