Documentation
¶
Overview ¶
Package version holds loomuxd's own release version (design spec §10 axis 4) — independent of the API version (axis 1, /api/v1/...): a server patch release doesn't force an API version bump, only a breaking API change does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is loomuxd's semver release version. Overridable at build time via
go build -ldflags "-X github.com/Loomux/server/version.Version=1.2.3"
"dev" when built without that flag (e.g. a local `go build`/`go run`). CI stamps "<release> (web <web version>)" or, unreleased, "<short sha> (web ...)"; Parse reads the leading token.
Functions ¶
This section is empty.
Types ¶
type Semver ¶ added in v0.3.78
type Semver struct {
Major, Minor, Patch int
// Pre is the pre-release part after the hyphen ("rc.1"), "" for a
// release.
Pre string
}
Semver is a parsed X.Y.Z[-pre] version (SemVer 2.0.0, no build metadata), as the release line and plugin manifests use it (LOOM-194).
func Parse ¶ added in v0.3.78
Parse reads the version a version string starts with: "0.3.74 (web 0.3.12)" is 0.3.74. "dev", a commit, or anything that isn't X.Y.Z is not a version (ok false): a host built without a release.
func (Semver) Compare ¶ added in v0.3.78
Compare orders versions: -1, 0 or 1 as v is before, the same as or after o. A pre-release comes before its release; two pre-releases compare as strings.