version

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package version reports the build version of the akari binaries.

Both akari and akari-server print this through their `version` command (and the `--version` flag). The value is resolved with the same precedence the release pipeline relies on:

  1. An explicit ldflags override. Release CI builds with -ldflags "-X github.com/jssblck/akari/internal/version.Version=v1.2.3" so the reported version is exactly the release tag, regardless of how the repository was cloned.
  2. Otherwise the VCS revision the Go toolchain embeds in the binary (debug.ReadBuildInfo), so a plain `go build` still reports the commit it was built from with a "-dirty" suffix for uncommitted changes.
  3. Otherwise "dev", for a build with no version override and no embedded VCS stamp (for example `go run` against a source tree with no .git).

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the build version. It is "dev" by default and overridden at link time by release CI via -ldflags "-X .../internal/version.Version=<tag>". Read it through String, which applies the VCS-revision fallback.

Functions

func String

func String() string

String returns the version to report to users. It prefers an ldflags override and falls back to the embedded VCS revision so an untagged local build still reports something meaningful instead of a bare "dev".

Types

This section is empty.

Jump to

Keyboard shortcuts

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