all repos — website @ a04ec2d5658a85913c81061636309893d96f0531

My website

fix missing commit hashes in binary
Alan Pearce alan@alanpearce.eu
Sat, 27 Apr 2024 21:34:47 +0200
commit

a04ec2d5658a85913c81061636309893d96f0531

parent

2a4c795d5a165f995e9f7dc84e07465b140f3770

2 files changed, 7 insertions(+), 2 deletions(-)

jump to
M internal/server/server.gointernal/server/server.go
@@ -25,6 +25,11 @@ ) 
 var config *cfg.Config
 
+var (
+	CommitSHA string
+	ShortSHA  string
+)
+
 type Config struct {
 	Production    bool    `conf:"default:false"`
 	InDevServer   bool    `conf:"default:false"`
M nix/default.nixnix/default.nix
@@ -80,9 +80,9 @@ ldflags = [       "-s"
       "-w"
       "-X"
-      "main.CommitSHA=${fullSHA}"
+      "website/internal/server.CommitSHA=${fullSHA}"
       "-X"
-      "main.ShortSHA=${shortSHA}"
+      "website/internal/server.ShortSHA=${shortSHA}"
     ];
   };
   docker-stream = mkDockerStream { inherit server website; };