Retain platformio cache
As compiling might take long, it is not a good idea to remove the platformio cache with the `rsync --delete` on every deployment.
This commit is contained in:
parent
66fe0d9539
commit
f3383f21a8
1 changed files with 15 additions and 3 deletions
|
|
@ -43,9 +43,21 @@ in
|
|||
system.activationScripts.esphome-custom = {
|
||||
deps = [ "users" "groups" ];
|
||||
text = ''
|
||||
mkdir -p "${stateDir}/.esphome"
|
||||
${pkgs.rsync}/bin/rsync -a --delete "${cfgdir}/" "${stateDir}/"
|
||||
chown esphome:esphome "${stateDir}/"
|
||||
${pkgs.rsync}/bin/rsync \
|
||||
-a \
|
||||
--delete \
|
||||
--exclude=.esphome \
|
||||
--exclude=.platformio \
|
||||
--exclude=.gitignore \
|
||||
"${cfgdir}/" "${stateDir}/"
|
||||
mkdir -p \
|
||||
"${stateDir}/.esphome" \
|
||||
"${stateDir}/.platformio"
|
||||
touch "${stateDir}/.gitignore"
|
||||
chown esphome:esphome \
|
||||
"${stateDir}/" \
|
||||
"${stateDir}/.esphome" \
|
||||
"${stateDir}/.platformio"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue