Added imagemagick support to the github action #16

Merged
N0tAI merged 3 commits from favicon-fix into main 2026-04-04 07:44:58 +00:00
N0tAI commented 2026-04-04 07:41:22 +00:00 (Migrated from github.com)
No description provided.
gemini-code-assist[bot] (Migrated from github.com) reviewed 2026-04-04 07:42:39 +00:00
gemini-code-assist[bot] (Migrated from github.com) left a comment

Code Review

This pull request updates scripts/mkicons.sh to dynamically detect the ImageMagick command (magick or convert) before generating icons. Feedback includes double-quoting the command variable for robustness and refactoring repetitive icon generation steps into a loop to improve maintainability.

## Code Review This pull request updates `scripts/mkicons.sh` to dynamically detect the ImageMagick command (`magick` or `convert`) before generating icons. Feedback includes double-quoting the command variable for robustness and refactoring repetitive icon generation steps into a loop to improve maintainability.
@ -1,15 +1,23 @@
#!/bin/bash
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-04 07:42:39 +00:00

medium

The variable ${cmd} should be double-quoted to prevent word splitting and globbing, following the Google Shell Style Guide. This ensures the script remains robust even if the command path contains spaces or special characters.

"${cmd}" -background none "${FAVICON}" -define icon:auto-resize=16,32,48 'public/favicon.ico'
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) The variable `${cmd}` should be double-quoted to prevent word splitting and globbing, following the Google Shell Style Guide. This ensures the script remains robust even if the command path contains spaces or special characters. ```suggestion "${cmd}" -background none "${FAVICON}" -define icon:auto-resize=16,32,48 'public/favicon.ico' ```
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-04 07:42:39 +00:00

medium

These lines repeat the same command structure with different sizes. Refactoring this into a loop improves maintainability and adheres to the DRY (Don't Repeat Yourself) principle. It also ensures that any future changes to the command flags or naming conventions only need to be updated in one place.

for size in 180 192 384 512 1024; do
    "${cmd}" -background none -size "${size}x${size}" "${FAVICON_SQUARE}" "public/thayen-dev-${size}.png"
done
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) These lines repeat the same command structure with different sizes. Refactoring this into a loop improves maintainability and adheres to the DRY (Don't Repeat Yourself) principle. It also ensures that any future changes to the command flags or naming conventions only need to be updated in one place. ```suggestion for size in 180 192 384 512 1024; do "${cmd}" -background none -size "${size}x${size}" "${FAVICON_SQUARE}" "public/thayen-dev-${size}.png" done ```
Sign in to join this conversation.
No description provided.