about summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
authorAlan Pearce2024-05-25 02:31:40 +0200
committerAlan Pearce2024-05-25 02:31:40 +0200
commitfb07320a12f83ffaf80bf3c0aca94a720f865201 (patch)
treefb36a9853c19c1549ba63f2b5c2ca7b0c90a76ff /cmd
parent4c4b980bff860dda725253438b499245338161df (diff)
downloadsearchix-fb07320a12f83ffaf80bf3c0aca94a720f865201.tar.lz
searchix-fb07320a12f83ffaf80bf3c0aca94a720f865201.tar.zst
searchix-fb07320a12f83ffaf80bf3c0aca94a720f865201.zip
build: just use nix version as internal version
Diffstat (limited to 'cmd')
-rw-r--r--cmd/searchix-web/main.go8
1 files changed, 1 insertions, 7 deletions
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?!")
 		}