Documentation
¶
Overview ¶
Package version carries the build version of Ken and the location of its Corresponding Source (the AGPL-3.0 §13 network-interaction obligation).
Index ¶
Constants ¶
const DevVersion = "1.1.0-dev"
DevVersion is the value compiled into a source build — i.e. any binary whose version was NOT injected by the release script. Used to tell an operator that what they are running is not a published release artifact.
Variables ¶
var Version = DevVersion
Version is the current Ken version. Overridable at build time via -ldflags.
Functions ¶
func IsReleaseBuild ¶
func IsReleaseBuild() bool
IsReleaseBuild reports whether the version was injected at build time, i.e. this binary came from the release pipeline rather than a plain `go build`.
func Line ¶
func Line() string
Line is the one-line human-readable build identity printed by `ken version`. A source build is marked explicitly: the version it reports is the compiled-in placeholder, not a released artifact, and saying so prevents a bug report against a version that was never published. It also surfaces a silently failed -ldflags injection (an unknown -X symbol is NOT an error for `go build`).
func SourceURL ¶
func SourceURL() string
SourceURL returns where THIS running instance's Corresponding Source can be obtained. It is displayed in the web UI (including the unauthenticated login and setup pages) to satisfy AGPL-3.0 §13, which requires a network-interactive modified version to offer ITS OWN source to remote users.
Resolution order: the KEN_SOURCE_URL environment variable, then the build-time value, then this project's repository. The environment override is what makes the obligation dischargeable by a FORK: anyone running modified Ken can point the link at their own repository without patching the binary. Without it, a modified instance would advertise upstream's repository — source that does not correspond to the running program — putting the operator in violation.
Types ¶
This section is empty.