Skip to content

Commit

Permalink
fix: remove -dirty suffix from revision
Browse files Browse the repository at this point in the history
Avoids unnecessary rebuilds in local dev.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
  • Loading branch information
brianmcgee committed May 13, 2024
1 parent b11474c commit 97e94ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 97e94ba

Please sign in to comment.