Report the embedded release version

This commit is contained in:
2026-08-29 23:13:01 +00:00
parent 51edd384c0
commit ee2b8e63e6
6 changed files with 84 additions and 1 deletions

17
internal/app/version.go Normal file
View File

@@ -0,0 +1,17 @@
package app
import (
"fmt"
"io"
"gitea.maximumdirect.net/eric/narratio/internal/buildinfo"
)
// Version prints the version embedded in the current Narratio binary.
func Version(args []string, out io.Writer) error {
if len(args) != 0 {
return fmt.Errorf("version: unexpected arguments")
}
_, err := fmt.Fprintf(out, "narratio %s\n", buildinfo.Version)
return err
}