Files
mfer/cmd/mfer/main.go
T
clawbot 9199444d11
check / check (push) Waiting to run
Take the version from the git tag, not a constant (closes #80)
`mfer version`, `mfer --version` and the banner print the revision the
build stamps into main.Gitrev or, when it stamped none (as after
`go install` of a tag), the main module's version from
runtime/debug.ReadBuildInfo. The banner no longer shows a release date.

mfer.Version and mfer.ReleaseDate go, with main.Version and the version
field and parameter in internal/cli that nothing read. A program using
the library reads the module version from its own build information.
The README says where the version comes from.

Judgement call: a binary with no build information, or none holding a
module version, prints "unknown", the word script/build already uses
when git describe gives nothing.

Model: opus-5-5
2026-10-14 00:00:35 +02:00

22 lines
410 B
Go

// Command mfer generates and verifies file manifests.
package main
import (
"os"
"sneak.berlin/go/mfer/internal/cli"
)
// Appname is the name of this program.
const Appname = "mfer"
// Gitrev is the revision `mfer version` prints, injected at build time via
// -ldflags.
//
//nolint:gochecknoglobals // set via ldflags at build time
var Gitrev string
func main() {
os.Exit(cli.Run(Appname, Gitrev))
}