1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-23 03:29:48 +01:00

writeDeploy: add fast option

This commit is contained in:
lassulus 2019-10-20 17:48:32 +02:00 committed by lassulus
parent 8f44460003
commit 6d1c35ea2c

View file

@ -36,18 +36,31 @@ in
];
};
writeDeploy = name: { backup ? false, force ? false, source, target }: let
writeDeploy = name: {
backup ? false,
fast ? false,
force ? false,
source,
target
}: let
target' = lib.mkTarget target;
in
writeDash name ''
set -efu
${populate { inherit backup force source; target = target'; }}
${rebuild ["dry-build"] target'}
${build target'}
${lib.optionalString (! fast) ''
${rebuild ["dry-build"] target'}
${build target'}
''}
${rebuild ["switch"] target'}
'';
writeTest = name: { backup ? false, force ? false, source, target }: let
writeTest = name: {
backup ? false,
force ? false,
source,
target
}: let
target' = lib.mkTarget target;
in
assert lib.isLocalTarget target';