gnome3.updateScript: optimize unfrozen updates

When the updates are not frozen, there is no need to try to extract versions from attributes.
This commit is contained in:
Jan Tojnar 2020-04-25 15:32:16 +02:00
parent f544c293ec
commit 4239bf17ec
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -12,7 +12,7 @@ let
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
nextMinor = builtins.fromJSON minorVersion + 1;
upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}";
in lib.optionalString (minorAvailable && freeze) ''--upper-bound="${upperBound}"'';
in lib.optionalString (freeze && minorAvailable) ''--upper-bound="${upperBound}"'';
updateScript = writeScript "gnome-update-script" ''
#!${stdenv.shell}
set -o errexit