diff options
Diffstat (limited to 'release.nix')
-rw-r--r-- | release.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/release.nix b/release.nix index 075ef8b..06bf91d 100644 --- a/release.nix +++ b/release.nix @@ -1,5 +1,5 @@ { patchelfSrc ? { outPath = ./.; revCount = 1234; shortRev = "abcdef"; } -, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz +, nixpkgs ? builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-20.03.tar.gz , officialRelease ? false }: @@ -14,13 +14,19 @@ 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 ? lastModifiedDate + then builtins.substring 0 8 patchelfSrc.lastModifiedDate + else toString patchelfSrc.revCount or 0) + + "." + patchelfSrc.shortRev)); versionSuffix = ""; # obsolete src = patchelfSrc; preAutoconf = "echo ${version} > version"; postDist = '' - cp README $out/ - echo "doc readme $out/README" >> $out/nix-support/hydra-build-products + cp README.md $out/ + echo "doc readme $out/README.md" >> $out/nix-support/hydra-build-products ''; }; |