From d0a18ee7b2db85c9482b1b096ad3b12a112db6be Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 Apr 2024 22:19:21 +0200 Subject: Brand server executable with full commit hash --- nix/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nix') 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 { -- cgit 1.4.1