- go.mod (1.24.2 + initial bubbletea/lipgloss) - Makefile (build, install to ~/.local/bin/gralculator, test, clean; ldflags version injection) - internal/version (ldflags-compatible String()) - main.go stub (version flag + placeholder) - internal/calc/ (Engine skeleton with Base, CycleBase, IsInteger, ErrConversionNotPossible, FormatForDisplay stub + basic tests for CERR path) - internal/ui/ (App model stub with Tab handling placeholder + lipgloss import for future rendering) This establishes the three-phase foundation. Next: flesh out engine (phase 2), then TUI spike (phase 3). Paper trail continues.
18 lines
414 B
Go
18 lines
414 B
Go
package version
|
|
|
|
// These vars are set at build time via -ldflags (see Makefile), e.g.
|
|
// -ldflags "-X github.com/gmgauthier/gralculator/internal/version.Version=0.1.0 -X .../Commit=... -X .../BuildDate=..."
|
|
var (
|
|
Version = "dev"
|
|
Commit = ""
|
|
BuildDate = ""
|
|
)
|
|
|
|
// String returns a human-friendly version string.
|
|
func String() string {
|
|
if Commit != "" {
|
|
return Version + "-" + Commit
|
|
}
|
|
return Version
|
|
}
|