Add version line after banner with release date

Added mfer/constants.go with Version and ReleaseDate constants for
deterministic builds. Banner now shows "mfer by @sneak: v0.1.0 released 2025-12-17"
This commit is contained in:
Jeffrey Paul 2025-12-17 15:23:55 -08:00
parent 818358a8a1
commit 6edc798de0
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import (
"github.com/spf13/afero"
"github.com/urfave/cli/v2"
"sneak.berlin/go/mfer/internal/log"
"sneak.berlin/go/mfer/mfer"
)
// CLIApp is the main CLI application container. It holds configuration,
@ -43,6 +44,7 @@ const banner = `
func (mfa *CLIApp) printBanner() {
if log.GetLevel() <= log.InfoLevel {
_, _ = fmt.Fprintln(mfa.Stdout, banner)
_, _ = fmt.Fprintf(mfa.Stdout, " mfer by @sneak: v%s released %s\n", mfer.Version, mfer.ReleaseDate)
}
}

6
mfer/constants.go Normal file
View File

@ -0,0 +1,6 @@
package mfer
const (
Version = "0.1.0"
ReleaseDate = "2025-12-17"
)