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
1 changed files with 17 additions and 4 deletions

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';