From fb07320a12f83ffaf80bf3c0aca94a720f865201 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 25 May 2024 02:31:40 +0200 Subject: build: just use nix version as internal version --- cmd/searchix-web/main.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'cmd') diff --git a/cmd/searchix-web/main.go b/cmd/searchix-web/main.go index 91ecc7a..f065a84 100644 --- a/cmd/searchix-web/main.go +++ b/cmd/searchix-web/main.go @@ -13,8 +13,6 @@ import ( "searchix/internal/config" ) -var buildVersion string - var ( configFile = flag.String("config", "config.toml", "config `file` to use") printDefaultConfig = flag.Bool( @@ -31,11 +29,7 @@ var ( func main() { flag.Parse() if *version { - fmt.Fprintf(os.Stderr, "searchix %s", buildVersion) - if buildVersion != config.CommitSHA && buildVersion != config.ShortSHA { - fmt.Fprintf(os.Stderr, " %s", config.CommitSHA) - } - _, err := fmt.Fprint(os.Stderr, "\n") + _, err := fmt.Fprintf(os.Stderr, "searchix %s\n", config.Version) if err != nil { panic("can't write to standard error?!") } -- cgit 1.4.1