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:
parent
8f44460003
commit
6d1c35ea2c
1 changed files with 17 additions and 4 deletions
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue