1
0
Fork 0
mirror of https://cgit.krebsco.de/krops synced 2024-11-26 21:19:47 +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; target' = lib.mkTarget target;
in in
writeDash name '' writeDash name ''
set -efu set -efu
${populate { inherit backup force source; target = target'; }} ${populate { inherit backup force source; target = target'; }}
${lib.optionalString (! fast) ''
${rebuild ["dry-build"] target'} ${rebuild ["dry-build"] target'}
${build target'} ${build target'}
''}
${rebuild ["switch"] 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; target' = lib.mkTarget target;
in in
assert lib.isLocalTarget target'; assert lib.isLocalTarget target';