-
-
Notifications
You must be signed in to change notification settings - Fork 80
Added HA add-on support the proper way #621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #621 +/- ##
==========================================
- Coverage 80.20% 80.13% -0.07%
==========================================
Files 112 112
Lines 2899 2899
Branches 309 309
==========================================
- Hits 2325 2323 -2
- Misses 448 451 +3
+ Partials 126 125 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| #!/usr/bin/with-contenv bash | ||
| echo "Starting NetDaemon Runner" | ||
| #!/usr/bin/with-contenv /usr/bin/bashio | ||
| echo "Starting NetDaemon Runner for add-on" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo "Starting NetDaemon Runner for add-on" | |
| bashio::log.info "Starting NetDaemon Runner for add-on" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bashio::log.* should be used for all echo stements
| if [ ! -f ${Netdaemon__ApplicationAssembly} ]; | ||
| then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if [ ! -f ${Netdaemon__ApplicationAssembly} ]; | |
| then | |
| if ! bashio::fs.file_exists "${Netdaemon__ApplicationAssembly}"; then |
| echo -e "\\033[31mThe assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings.\\033[0m" >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo -e "\\033[31mThe assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings.\\033[0m" >&2 | |
| exit 1 | |
| bashio::exit.nok "The assembly ${Netdaemon__ApplicationAssembly} cannot be found. Please check the settings." |
| echo -e "\\033[31mCould not change directory to run custom project\\033[0m" >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo -e "\\033[31mCould not change directory to run custom project\\033[0m" >&2 | |
| exit 1 | |
| bashio::exit.nok "Could not change directory to run custom project" |
* Added HA add-on support the proper way * fix casing * Set needed environment using new env style * Fixed run script after review
Breaking change
Proposed change
Makes config of add-on containers the proper way using environment vars. Thanks @ludeeus for the input. This also allowed us to remove the special host created for add-on.
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: