Closed AlexMKX closed 1 year ago
There seem to be a bunch of unrelated changes in this PR.
../Frenck
Hello @frenck Thank you for reviewing the PR. Actually, I've tried to cope with UTF-8 BOM with those commits. Should've I squash them?
Though it seems github added package.json and config.yaml (not sure why, I've explicitly reverted them). The only changes are :
mkdir -p /share/appdaemon/apk.cache
ln -s /share/appdaemon/apk.cache /etc/apk/cache
find /config/appdaemon -name system_packages.txt -type f -not -empty -exec cat {} \; -exec echo -n " " \; | tr -d '\xEF\xBB\xBF' | sed ':a;N;$!ba;s/\n/ /g' | xargs -n 1 -r -t apk add
mkdir -p /share/appdaemon/pip.cache
find /config/appdaemon -name requirements.txt -type f -not -empty -exec pip3 --cache-dir /share/appdaemon/pip.cache install --upgrade -r {} \;
It replicates this functionality : https://appdaemon.readthedocs.io/en/latest/DOCKER_TUTORIAL.html#runtime-dependencies
The short background : I created bunch of AD plugins and going to create more. Some of them needs specific packages. Although they can be added through the HASS Plugin settings, this is not true CI/CD and pythonic way because it involves lot of manual operations and unable to automate through terraform or another automation systems like ansible, chief and so forth.
By using above functionality, there is no need to click through the settings during the install at all. The only step is to copy the AD plugin and that's all.
Best, Alex.
By using above functionality, there is no need to click through the settings during the install at all. The only step is to copy the AD plugin and that's all.
I guess this means you didn't read my previous answer.
Nevertheless, thanks for being willing to contribute.
../Frenck
Proposed Changes
Porting the original functionality from the AppDaemon's docker image.
This change will consists of the following functionalities: