From 6f36c970df79500d30320978d0aae6b43a67052a Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Tue, 23 Jun 2026 12:53:09 +0200 Subject: [PATCH 1/2] Fix a bug with diff showing up due to path mismatch --- .github/workflows/JsonGenerator.yml | 8 ++++++++ .github/workflows/LuaGenerator.yml | 8 ++++++++ .github/workflows/PluginSkeletonGenerator.yml | 8 ++++++++ .github/workflows/ProxyStubGenerator.yml | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/.github/workflows/JsonGenerator.yml b/.github/workflows/JsonGenerator.yml index d4fcdbb4..45144fb5 100644 --- a/.github/workflows/JsonGenerator.yml +++ b/.github/workflows/JsonGenerator.yml @@ -225,6 +225,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the hunk headers so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF diff --git a/.github/workflows/LuaGenerator.yml b/.github/workflows/LuaGenerator.yml index d257c6f2..936c3952 100644 --- a/.github/workflows/LuaGenerator.yml +++ b/.github/workflows/LuaGenerator.yml @@ -187,6 +187,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the hunk headers so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF diff --git a/.github/workflows/PluginSkeletonGenerator.yml b/.github/workflows/PluginSkeletonGenerator.yml index f7bd83d0..da08195e 100644 --- a/.github/workflows/PluginSkeletonGenerator.yml +++ b/.github/workflows/PluginSkeletonGenerator.yml @@ -293,6 +293,14 @@ jobs: "baseline_${name}" "artifacts/PluginSkeleton-${name}" \ > "diffs/${name}.diff" || true + # Strip the differing roots from the hunk headers so both sides share an identical path + sed -i -E \ + -e "s#^(--- )baseline_${name}/#\\1#" \ + -e "s#^(\\+\\+\\+ )artifacts/PluginSkeleton-${name}/#\\1#" \ + -e "s#^(--- )artifacts/PluginSkeleton-${name}/#\\1#" \ + -e "s#^(\\+\\+\\+ )baseline_${name}/#\\1#" \ + "diffs/${name}.diff" + if [[ -s "diffs/${name}.diff" ]]; then npx --yes diff2html-cli@5.2.15 -i file -F "site/$RUN_DIR/diff/${name}.html" -- "diffs/${name}.diff" echo "$name" >> diffs/plugins_with_diffs.txt diff --git a/.github/workflows/ProxyStubGenerator.yml b/.github/workflows/ProxyStubGenerator.yml index fbea28c2..a87bcf56 100644 --- a/.github/workflows/ProxyStubGenerator.yml +++ b/.github/workflows/ProxyStubGenerator.yml @@ -233,6 +233,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the hunk headers so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF # Update export so Python sees "true" From 2d07ab664d970ba87d2ac4a4225f25bfd27dc00e Mon Sep 17 00:00:00 2001 From: VeithMetro Date: Tue, 23 Jun 2026 12:58:31 +0200 Subject: [PATCH 2/2] Update the comment to be more precise --- .github/workflows/JsonGenerator.yml | 2 +- .github/workflows/LuaGenerator.yml | 2 +- .github/workflows/PluginSkeletonGenerator.yml | 2 +- .github/workflows/ProxyStubGenerator.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/JsonGenerator.yml b/.github/workflows/JsonGenerator.yml index 45144fb5..81538b4b 100644 --- a/.github/workflows/JsonGenerator.yml +++ b/.github/workflows/JsonGenerator.yml @@ -225,7 +225,7 @@ jobs: > "diffs/combined.diff" || true fi - # Strip the differing root from the hunk headers so both sides share an identical path + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path sed -i -E \ -e 's#^(--- )baseline/#\1#' \ -e 's#^(\+\+\+ )generated/#\1#' \ diff --git a/.github/workflows/LuaGenerator.yml b/.github/workflows/LuaGenerator.yml index 936c3952..84e0fdbf 100644 --- a/.github/workflows/LuaGenerator.yml +++ b/.github/workflows/LuaGenerator.yml @@ -187,7 +187,7 @@ jobs: > "diffs/combined.diff" || true fi - # Strip the differing root from the hunk headers so both sides share an identical path + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path sed -i -E \ -e 's#^(--- )baseline/#\1#' \ -e 's#^(\+\+\+ )generated/#\1#' \ diff --git a/.github/workflows/PluginSkeletonGenerator.yml b/.github/workflows/PluginSkeletonGenerator.yml index da08195e..a01d1bea 100644 --- a/.github/workflows/PluginSkeletonGenerator.yml +++ b/.github/workflows/PluginSkeletonGenerator.yml @@ -293,7 +293,7 @@ jobs: "baseline_${name}" "artifacts/PluginSkeleton-${name}" \ > "diffs/${name}.diff" || true - # Strip the differing roots from the hunk headers so both sides share an identical path + # Strip the differing roots from the diff's ---/+++ file header lines so both sides share an identical path sed -i -E \ -e "s#^(--- )baseline_${name}/#\\1#" \ -e "s#^(\\+\\+\\+ )artifacts/PluginSkeleton-${name}/#\\1#" \ diff --git a/.github/workflows/ProxyStubGenerator.yml b/.github/workflows/ProxyStubGenerator.yml index a87bcf56..0540a1a9 100644 --- a/.github/workflows/ProxyStubGenerator.yml +++ b/.github/workflows/ProxyStubGenerator.yml @@ -233,7 +233,7 @@ jobs: > "diffs/combined.diff" || true fi - # Strip the differing root from the hunk headers so both sides share an identical path + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path sed -i -E \ -e 's#^(--- )baseline/#\1#' \ -e 's#^(\+\+\+ )generated/#\1#' \