From a67e3272f97e43d425031700e1833086501b1b88 Mon Sep 17 00:00:00 2001 From: JangOetama <46255322+JangOetama@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:56:18 +0700 Subject: [PATCH] ci: update different icons --- .github/workflows/convert.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/convert.yml b/.github/workflows/convert.yml index a19003b..0f4b49a 100644 --- a/.github/workflows/convert.yml +++ b/.github/workflows/convert.yml @@ -54,19 +54,24 @@ jobs: output_name="$output_path/$name.ico" output_hash_name="$output_hash_path/$name.ico" - echo "Converting $name..." + echo "Processing $name..." + + if [[ -f "$output_hash_name" && "$hash" != "$(cat $output_hash_name)" ]]; then + echo "Different hash, delete $name..." + [[ -f "$output_name" ]] && rm "$output_name" + [[ -f "$output_hash_name" ]] && rm "$output_hash_name" + fi if [[ -f "$output_name" && -f "$output_hash_name" && "$hash" == "$(cat $output_hash_name)" ]]; then echo "$name is already exist." continue fi + install_dependencies changed=true - [[ -f "$output_name" ]] && rm "$output_name" - [[ -f "$output_hash_name" ]] && rm "$output_hash_name" - + echo "Converting $name..." svgexport "$input_name" "$temp_name" png 1024:1024 convert -background transparent "$temp_name" -define icon:auto-resize="256,128,96,64,48,32,16" "$output_name"