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;
|
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'; }}
|
||||||
${rebuild ["dry-build"] target'}
|
${lib.optionalString (! fast) ''
|
||||||
${build target'}
|
${rebuild ["dry-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';
|
||||||
|
|
Loading…
Reference in a new issue