From ef731ee824bfadd557d28545ff16581dc30ecb06 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 19 Mar 2020 14:07:44 +0100 Subject: [PATCH] Require normal image when hDPI version is provided (#60) --- .github/workflows/validate/validate.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/validate/validate.sh b/.github/workflows/validate/validate.sh index 412fd9c0..8e279517 100755 --- a/.github/workflows/validate/validate.sh +++ b/.github/workflows/validate/validate.sh @@ -42,6 +42,15 @@ while read image; do [[ "${type}" != "PNG" ]] \ && error "${image}" "Invalid file type '${type}' for file" + # Ensure normal version exists when hDPI image is provided + [[ "${filename}" == "icon@2x.png" ]] \ + && [[ ! -f "${folderpath}/icon.png" ]] \ + && error "${image}" "hDPI icon was provided, but the normal version is missing" + + [[ "${filename}" == "logo@2x.png" ]] \ + && [[ ! -f "${folderpath}/logo.png" ]] \ + && error "${image}" "hDPI logo was provided, but the normal version is missing" + # Validate image dimensions if [[ "${filename}" == "icon.png" ]]; then # icon dimension