From a5357e80cd885ad9b36109f7a5369e67f649ee9e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 10 Oct 2013 12:16:20 +0200 Subject: [PATCH] Tweak the version string It's now ".pre." (e.g. "13.10pre5678.gfedcba") for the unstable branch, and "..." (e.g. "13.10.5678.gfedcba") for stable branches. --- nixos/release.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 8409ca87717..094eacf7059 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -1,11 +1,14 @@ { nixpkgs ? { outPath = ./..; revCount = 5678; shortRev = "gfedcba"; } , officialRelease ? false +, stableBranch ? false }: let version = builtins.readFile ../.version; - versionSuffix = "pre${toString nixpkgs.revCount}_${nixpkgs.shortRev}"; + versionSuffix = + if officialRelease then "" + else (if stableBranch then "." else "pre") + "${toString nixpkgs.revCount}.${nixpkgs.shortRev}"; systems = [ "x86_64-linux" "i686-linux" ]; @@ -13,7 +16,7 @@ let versionModule = - { system.nixosVersionSuffix = pkgs.lib.optionalString (!officialRelease) versionSuffix; }; + { system.nixosVersionSuffix = versionSuffix; }; makeIso = @@ -78,7 +81,8 @@ in { src = nixpkgs; - inherit officialRelease version versionSuffix; + officialRelease = false; # FIXME: fix this in makeSourceTarball + inherit version versionSuffix; buildInputs = [ pkgs.nixUnstable ];