From 97e94ba84829928fc421e5e78a724d9afaba78c4 Mon Sep 17 00:00:00 2001 From: Brian McGee Date: Mon, 13 May 2024 10:08:50 +0100 Subject: [PATCH] fix: remove -dirty suffix from revision Avoids unnecessary rebuilds in local dev. Signed-off-by: Brian McGee --- nix/packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/packages.nix b/nix/packages.nix index ee754f9d..724ca83e 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -19,7 +19,8 @@ pname = "treefmt"; # there's no good way of tying in the version to a git tag or branch # so for simplicity's sake we set the version as the commit revision hash - version = self.shortRev or self.dirtyShortRev; + # we remove the `-dirty` suffix to avoid a lot of unnecessary rebuilds in local dev + version = lib.removeSuffix "-dirty" (self.shortRev or self.dirtyShortRev); # ensure we are using the same version of go to build with inherit (pkgs) go;