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:
parent
f544c293ec
commit
4239bf17ec
@ -12,7 +12,7 @@ let
|
|||||||
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
|
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
|
||||||
nextMinor = builtins.fromJSON minorVersion + 1;
|
nextMinor = builtins.fromJSON minorVersion + 1;
|
||||||
upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}";
|
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" ''
|
updateScript = writeScript "gnome-update-script" ''
|
||||||
#!${stdenv.shell}
|
#!${stdenv.shell}
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user