From 6c71bc5d38aec8e2d502bfa545d53dd4bbaac952 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Sun, 22 Dec 2024 17:54:23 +0100 Subject: [PATCH] Fix CI workflows for themes with spaces in name --- .github/workflows/themes-screenshot-on-pr.yml | 6 +++--- .github/workflows/themes-screenshot-on-push.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/themes-screenshot-on-pr.yml b/.github/workflows/themes-screenshot-on-pr.yml index 76401c27..80e9f0ca 100644 --- a/.github/workflows/themes-screenshot-on-pr.yml +++ b/.github/workflows/themes-screenshot-on-pr.yml @@ -31,15 +31,15 @@ jobs: do if test -f "$dir/theme.yaml"; then # Keep only folder name - theme=`basename ${dir%*/}` + theme=`basename "${dir%*/}"` # Setup selected theme in config.yaml echo "Using theme $theme" - sed -i "/THEME:/c\ THEME: $theme" config.yaml + sed -i '/THEME:/c\ THEME: "'"$theme"'"' config.yaml # For tests there is no real HW: use simulated LCD mode # Check if theme is for 5" - orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g') + orientation=$(grep 'DISPLAY_SIZE' "$dir/theme.yaml" | sed 's/ //g') if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml else diff --git a/.github/workflows/themes-screenshot-on-push.yml b/.github/workflows/themes-screenshot-on-push.yml index 1c023337..60e8bc3d 100644 --- a/.github/workflows/themes-screenshot-on-push.yml +++ b/.github/workflows/themes-screenshot-on-push.yml @@ -42,15 +42,15 @@ jobs: do if test -f "$dir/theme.yaml"; then # Keep only folder name - theme=`basename ${dir%*/}` + theme=`basename "${dir%*/}"` # Setup selected theme in config.yaml echo "Using theme $theme" - sed -i "/THEME:/c\ THEME: $theme" config.yaml - + sed -i '/THEME:/c\ THEME: "'"$theme"'"' config.yaml + # For tests there is no real HW: use simulated LCD mode # Check if theme is for 5" - orientation=$(grep 'DISPLAY_SIZE' $dir/theme.yaml | sed 's/ //g') + orientation=$(grep 'DISPLAY_SIZE' "$dir/theme.yaml" | sed 's/ //g') if [ "$orientation" == "DISPLAY_SIZE:5\"" ]; then sed -i "/REVISION:/c\ REVISION: SIMU5" config.yaml else