about summary refs log tree commit diff stats
path: root/nix
diff options
context:
space:
mode:
authorAlan Pearce2024-04-23 22:19:21 +0200
committerAlan Pearce2024-04-23 22:19:21 +0200
commitd0a18ee7b2db85c9482b1b096ad3b12a112db6be (patch)
tree19f570c91b1dd1d13e3072f33cc5741330fbb0e9 /nix
parent5465b7b8462c1af9c6e2ebce9f82b75c918b66cc (diff)
downloadwebsite-d0a18ee7b2db85c9482b1b096ad3b12a112db6be.tar.lz
website-d0a18ee7b2db85c9482b1b096ad3b12a112db6be.tar.zst
website-d0a18ee7b2db85c9482b1b096ad3b12a112db6be.zip
Brand server executable with full commit hash
Diffstat (limited to 'nix')
-rw-r--r--nix/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nix/default.nix b/nix/default.nix
index aa0ac62..a2a6ed4 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -1,14 +1,14 @@
 { pkgs, self }:
 let
   version = self.shortRev or self.dirtyShortRev or "unstable-${self.lastModified}";
-  dockerTag = self.rev or self.dirtyRev or "unstable-${self.lastModified}";
+  fullSHA = self.rev or self.dirtyRev;
   mkDocker = type: { server, website }:
     let
       PORT = 80;
     in
     pkgs.dockerTools.${type} {
       name = "registry.fly.io/alanpearce-eu";
-      tag = dockerTag;
+      tag = fullSHA;
       contents = [
         (pkgs.writeTextDir "config.toml" (builtins.readFile ./../config.toml))
         website
@@ -74,7 +74,7 @@ with pkgs; rec {
       ];
     };
     modules = ./gomod2nix.toml;
-    ldflags = [ "-s" "-w" "-X" "main.Commit=${version}" ];
+    ldflags = [ "-s" "-w" "-X" "main.Commit=${fullSHA}" ];
   };
   docker-stream = mkDockerStream { inherit server website; };
   docker-stream-aarch64-linux = mkDockerStream {