diff --git a/.github/workflows/validate/validate.sh b/.github/workflows/validate/validate.sh index b918a29e..412fd9c0 100755 --- a/.github/workflows/validate/validate.sh +++ b/.github/workflows/validate/validate.sh @@ -28,10 +28,16 @@ while read image; do # Extract properties into variables filename=$(basename "${image}") + folderpath=$(dirname "${image}") + foldername=$(basename "${folderpath}") width="${properties[0]}" height="${properties[1]}" type="${properties[2]}" + # Underscore folders are special cases. Instead one should symlink between integration domains + [[ "${foldername}" == _* && "${foldername}" != "_placeholder" && "${foldername}" != "_homeassistant" ]] \ + && error "${folderpath}" "Directories should not start with an underscore (_), please use the integration domain instead" + # Ensure file is actually a PNG file [[ "${type}" != "PNG" ]] \ && error "${image}" "Invalid file type '${type}' for file" diff --git a/README.md b/README.md index 93b1f33f..c19cdc88 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,13 @@ symlinking domain folders for the same icon/logos is allowed. The deployment process at our hosting provider will unpack these symlinks to actual files during the deployment process. +Please note, symlinks should only be created between integration domain +directories. The `_placeholder` & `_homeassistant` directories are special +cases and new directories with an underscore (`_`) should not be created. + +The names of directories must always match the integration domain. Additional +directories are not allowed. + ## Trademark Legal Notices All product names, trademarks and registered trademarks in the images in this