mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-10 00:00:24 +03:00
build(nix): use actual commit rev in version
This way we get an actually unique version for every version that can be traced back to the source. Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
This commit is contained in:
parent
990437ad13
commit
2a15fc0445
@ -66,11 +66,11 @@
|
|||||||
|
|
||||||
craneLib = crane.mkLib pkgs;
|
craneLib = crane.mkLib pkgs;
|
||||||
|
|
||||||
libbcachefsCommit = substring 0 7 (builtins.readFile ./.bcachefs_revision);
|
rev = self.shortRev or self.dirtyShortRev or (substring 0 8 self.lastModifiedDate);
|
||||||
makefileVersion = removePrefix "VERSION=" (
|
makefileVersion = removePrefix "VERSION=" (
|
||||||
findFirst (line: hasPrefix "VERSION=" line) "VERSION=0.0.0" (split "\n" (readFile ./Makefile))
|
findFirst (line: hasPrefix "VERSION=" line) "VERSION=0.0.0" (split "\n" (readFile ./Makefile))
|
||||||
);
|
);
|
||||||
version = "${makefileVersion}+git-${libbcachefsCommit}";
|
version = "${makefileVersion}+${rev}";
|
||||||
|
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user