summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-23 11:59:05 (GMT)
committerEelco Dolstra <edolstra@gmail.com>2019-10-23 11:59:05 (GMT)
commit2ba64817ec6f3b714503ea6e6aa8439505bb7393 (patch)
treecd83802f9742b59e614f5038c9e07fff7f7d99bf
parentac07356b08595f288c5d01eff4bd7d342c8d7ff7 (diff)
downloadpatchelf-2ba64817ec6f3b714503ea6e6aa8439505bb7393.zip
patchelf-2ba64817ec6f3b714503ea6e6aa8439505bb7393.tar.gz
patchelf-2ba64817ec6f3b714503ea6e6aa8439505bb7393.tar.bz2
Use lastModified
-rw-r--r--release.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/release.nix b/release.nix
index 075ef8b..2de382b 100644
--- a/release.nix
+++ b/release.nix
@@ -14,7 +14,13 @@ let
tarball =
pkgs.releaseTools.sourceTarball rec {
name = "patchelf-tarball";
- version = builtins.readFile ./version + (if officialRelease then "" else "pre${toString patchelfSrc.revCount or 0}_${patchelfSrc.shortRev or "0000000"}");
+ version = builtins.readFile ./version +
+ (if officialRelease then "" else
+ "." +
+ ((if patchelfSrc ? lastModified
+ then builtins.substring 0 8 patchelfSrc.lastModified
+ else toString patchelfSrc.revCount or 0)
+ + "." + patchelfSrc.shortRev));
versionSuffix = ""; # obsolete
src = patchelfSrc;
preAutoconf = "echo ${version} > version";