Skip to content

Commit 97e94ba

Browse files
committed
fix: remove -dirty suffix from revision
Avoids unnecessary rebuilds in local dev. Signed-off-by: Brian McGee <[email protected]>
1 parent b11474c commit 97e94ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nix/packages.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
pname = "treefmt";
2020
# there's no good way of tying in the version to a git tag or branch
2121
# so for simplicity's sake we set the version as the commit revision hash
22-
version = self.shortRev or self.dirtyShortRev;
22+
# we remove the `-dirty` suffix to avoid a lot of unnecessary rebuilds in local dev
23+
version = lib.removeSuffix "-dirty" (self.shortRev or self.dirtyShortRev);
2324

2425
# ensure we are using the same version of go to build with
2526
inherit (pkgs) go;

0 commit comments

Comments
 (0)