diff options
-rw-r--r-- | release.nix | 8 |
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"; |