From bd40246baa6ab4c161c1f256dff548a27abfe584 Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Sun, 31 May 2026 00:47:57 +0300 Subject: [PATCH] .github/scripts/capsule-versioning-check.sh: don't fail on new configs If a new defconfig was added between the previous and current tag, the script failed with an error like this: fatal: path 'configs/config.gigabyte_mz33-ar1' exists on disk, but not in 'msi_ms7e06_v0.9.4' Change-Id: Ic50dbfb5432cc59ec2ac9e14eb5296e08fe28da2 Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Sergii Dmytruk --- .github/scripts/capsule-versioning-check.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/capsule-versioning-check.sh b/.github/scripts/capsule-versioning-check.sh index 02e7694c37..507a3f4fa2 100755 --- a/.github/scripts/capsule-versioning-check.sh +++ b/.github/scripts/capsule-versioning-check.sh @@ -75,7 +75,11 @@ fail=0 mapfile -t configs < <(grep -l 'EFI_UPDATE_CAPSULE' configs/config.*) for config in "${configs[@]}"; do new_config=$(git show "$new_tag:$config") - old_config=$(git show "$old_tag:$config") + if ! old_config=$(git show "$old_tag:$config"); then + # `git show revision:path` fails if the revision doesn't contain the + # path and we also have nothing to do in this case + continue + fi # check that `CONFIG_EDK2_CAPSULES_V2=y` is not added to # `CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=y` without